[omnibox] Remove kOmniboxSearchReadyIncognito
This was defaulted to true in November of last year in https://crrev.com/c/2510355 so I believe it's safe to remove now. Bug: 894211 Change-Id: Ibcd545f2bb46f4b0f68fadb9178b76c3c25e5f96 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2927698 Reviewed-by: Filip Gorski <fgorski@chromium.org> Reviewed-by: Justin Donnelly <jdonnelly@chromium.org> Reviewed-by: Tomasz Wiszkowski <ender@google.com> Commit-Queue: Filip Gorski <fgorski@chromium.org> Cr-Commit-Position: refs/heads/master@{#890901}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
170d9f77dd
commit
d21ff9fcfd
chrome
android
java
src
org
chromium
chrome
browser
omnibox
suggestions
javatests
src
org
chromium
chrome
browser
omnibox
suggestions
browser
components/omnibox
@ -9,7 +9,6 @@ import android.content.Context;
|
||||
import org.chromium.base.metrics.RecordUserAction;
|
||||
import org.chromium.base.supplier.Supplier;
|
||||
import org.chromium.chrome.R;
|
||||
import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
||||
import org.chromium.chrome.browser.history_clusters.HistoryClustersTabHelper;
|
||||
import org.chromium.chrome.browser.omnibox.OmniboxSuggestionType;
|
||||
import org.chromium.chrome.browser.omnibox.suggestions.OmniboxSuggestionUiType;
|
||||
@ -81,11 +80,6 @@ public class EditUrlSuggestionProcessor extends BaseSuggestionViewProcessor {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (activeTab.isIncognito()
|
||||
&& !ChromeFeatureList.isEnabled(ChromeFeatureList.OMNIBOX_SEARCH_READY_INCOGNITO)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (suggestion.getType() != OmniboxSuggestionType.URL_WHAT_YOU_TYPED
|
||||
|| !suggestion.getUrl().equals(activeTab.getUrl())) {
|
||||
return false;
|
||||
|
@ -31,7 +31,6 @@ import org.chromium.base.UserDataHost;
|
||||
import org.chromium.base.test.BaseJUnit4ClassRunner;
|
||||
import org.chromium.base.test.UiThreadTest;
|
||||
import org.chromium.base.test.util.Batch;
|
||||
import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
||||
import org.chromium.chrome.browser.omnibox.OmniboxSuggestionType;
|
||||
import org.chromium.chrome.browser.omnibox.suggestions.SuggestionHost;
|
||||
import org.chromium.chrome.browser.omnibox.suggestions.UrlBarDelegate;
|
||||
@ -44,8 +43,6 @@ import org.chromium.chrome.browser.share.ShareDelegate.ShareOrigin;
|
||||
import org.chromium.chrome.browser.tab.SadTab;
|
||||
import org.chromium.chrome.browser.tab.Tab;
|
||||
import org.chromium.chrome.test.util.browser.Features;
|
||||
import org.chromium.chrome.test.util.browser.Features.DisableFeatures;
|
||||
import org.chromium.chrome.test.util.browser.Features.EnableFeatures;
|
||||
import org.chromium.components.favicon.LargeIconBridge;
|
||||
import org.chromium.components.omnibox.AutocompleteMatch;
|
||||
import org.chromium.components.search_engines.TemplateUrlService;
|
||||
@ -186,7 +183,6 @@ public final class EditUrlSuggestionUnitTest {
|
||||
@Test
|
||||
@SmallTest
|
||||
@UiThreadTest
|
||||
@EnableFeatures(ChromeFeatureList.OMNIBOX_SEARCH_READY_INCOGNITO)
|
||||
public void testSuggestionTriggered_Incognito() {
|
||||
verifyUrlSuggestionTriggered(/* isIncognito */ true);
|
||||
}
|
||||
@ -206,7 +202,6 @@ public final class EditUrlSuggestionUnitTest {
|
||||
@Test
|
||||
@SmallTest
|
||||
@UiThreadTest
|
||||
@EnableFeatures(ChromeFeatureList.OMNIBOX_SEARCH_READY_INCOGNITO)
|
||||
public void testWhatYouTypedWrongUrl_Incognito() {
|
||||
verifyWhatYouTypedWrongUrl(/* isIncognito */ true);
|
||||
}
|
||||
@ -226,7 +221,6 @@ public final class EditUrlSuggestionUnitTest {
|
||||
@Test
|
||||
@SmallTest
|
||||
@UiThreadTest
|
||||
@EnableFeatures(ChromeFeatureList.OMNIBOX_SEARCH_READY_INCOGNITO)
|
||||
public void testEditButtonPress_Incognito() {
|
||||
verifyEditButtonPress(/* isIncognito */ true);
|
||||
}
|
||||
@ -243,7 +237,6 @@ public final class EditUrlSuggestionUnitTest {
|
||||
@Test
|
||||
@SmallTest
|
||||
@UiThreadTest
|
||||
@EnableFeatures(ChromeFeatureList.OMNIBOX_SEARCH_READY_INCOGNITO)
|
||||
public void testShareButtonPress_Incognito() {
|
||||
verifyShareButtonPress(/* isIncognito */ true);
|
||||
}
|
||||
@ -260,7 +253,6 @@ public final class EditUrlSuggestionUnitTest {
|
||||
@Test
|
||||
@SmallTest
|
||||
@UiThreadTest
|
||||
@EnableFeatures(ChromeFeatureList.OMNIBOX_SEARCH_READY_INCOGNITO)
|
||||
public void testCopyButtonPress_Incognito() {
|
||||
verifyCopyButtonPress(/* isIncognito */ true);
|
||||
}
|
||||
@ -275,23 +267,10 @@ public final class EditUrlSuggestionUnitTest {
|
||||
@Test
|
||||
@SmallTest
|
||||
@UiThreadTest
|
||||
@EnableFeatures(ChromeFeatureList.OMNIBOX_SEARCH_READY_INCOGNITO)
|
||||
public void testSearchSuggestionTriggered_Incognito() {
|
||||
verifySearchSuggestionTriggered(/* isIncognito */ true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SmallTest
|
||||
@UiThreadTest
|
||||
@DisableFeatures(ChromeFeatureList.OMNIBOX_SEARCH_READY_INCOGNITO)
|
||||
public void testSuggestionNotTriggering_IncognitoDisabled() {
|
||||
setIncognito(true);
|
||||
|
||||
mProcessor.onUrlFocusChange(true);
|
||||
Assert.assertFalse("The processor shouldn't handle the \"what you typed\" suggestion.",
|
||||
mProcessor.doesProcessSuggestion(mWhatYouTypedSuggestion, 0));
|
||||
}
|
||||
|
||||
public void verifyUrlSuggestionTriggered(boolean isIncognito) {
|
||||
setIncognito(isIncognito);
|
||||
mProcessor.onUrlFocusChange(true);
|
||||
|
@ -4170,10 +4170,6 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kOmniboxMostVisitedTilesName,
|
||||
flag_descriptions::kOmniboxMostVisitedTilesDescription, kOsAndroid,
|
||||
FEATURE_VALUE_TYPE(omnibox::kMostVisitedTiles)},
|
||||
{"omnibox-search-ready-incognito",
|
||||
flag_descriptions::kOmniboxSearchReadyIncognitoName,
|
||||
flag_descriptions::kOmniboxSearchReadyIncognitoDescription, kOsAndroid,
|
||||
FEATURE_VALUE_TYPE(omnibox::kOmniboxSearchReadyIncognito)},
|
||||
{"omnibox-tab-switch-suggestions",
|
||||
flag_descriptions::kOmniboxTabSwitchSuggestionsName,
|
||||
flag_descriptions::kOmniboxTabSwitchSuggestionsDescription, kOsAndroid,
|
||||
|
@ -1722,11 +1722,6 @@ const char kOmniboxOnFocusSuggestionsContextualWebDescription[] =
|
||||
"current URL. Will only work if user is signed-in and syncing, or is "
|
||||
"otherwise eligible to send the current page URL to the suggest server.";
|
||||
|
||||
const char kOmniboxSearchReadyIncognitoName[] =
|
||||
"Search ready omnibox in incognito";
|
||||
const char kOmniboxSearchReadyIncognitoDescription[] =
|
||||
"Show search ready omnibox when browsing incognito.";
|
||||
|
||||
const char kOmniboxSpareRendererName[] =
|
||||
"Start spare renderer on omnibox focus";
|
||||
const char kOmniboxSpareRendererDescription[] =
|
||||
|
@ -985,9 +985,6 @@ extern const char kOmniboxOnFocusSuggestionsContextualWebDescription[];
|
||||
extern const char kOmniboxShortBookmarkSuggestionsName[];
|
||||
extern const char kOmniboxShortBookmarkSuggestionsDescription[];
|
||||
|
||||
extern const char kOmniboxSearchReadyIncognitoName[];
|
||||
extern const char kOmniboxSearchReadyIncognitoDescription[];
|
||||
|
||||
extern const char kOmniboxSpareRendererName[];
|
||||
extern const char kOmniboxSpareRendererDescription[];
|
||||
|
||||
|
@ -282,7 +282,6 @@ const base::Feature* const kFeaturesExposedToJava[] = {
|
||||
&omnibox::kHideVisitsFromCct,
|
||||
&omnibox::kMostVisitedTiles,
|
||||
&omnibox::kOmniboxAssistantVoiceSearch,
|
||||
&omnibox::kOmniboxSearchReadyIncognito,
|
||||
&optimization_guide::features::kPushNotifications,
|
||||
&password_manager::features::kEditPasswordsInSettings,
|
||||
&password_manager::features::kPasswordScriptsFetching,
|
||||
|
@ -394,7 +394,6 @@ public abstract class ChromeFeatureList {
|
||||
"OmniboxEnableClipboardProviderImageSuggestions";
|
||||
public static final String OMNIBOX_HIDE_VISITS_FROM_CCT = "OmniboxHideVisitsFromCct";
|
||||
public static final String OMNIBOX_MOST_VISITED_TILES = "OmniboxMostVisitedTiles";
|
||||
public static final String OMNIBOX_SEARCH_READY_INCOGNITO = "OmniboxSearchReadyIncognito";
|
||||
public static final String OMNIBOX_SPARE_RENDERER = "OmniboxSpareRenderer";
|
||||
public static final String OPTIMIZATION_GUIDE_PUSH_NOTIFICATIONS =
|
||||
"OptimizationGuidePushNotifications";
|
||||
|
@ -327,11 +327,8 @@ AutocompleteController::AutocompleteController(
|
||||
providers_.push_back(
|
||||
new MostVisitedSitesProvider(provider_client_.get(), this));
|
||||
// Note: the need for the always-present verbatim match originates from the
|
||||
// OmniboxSearchReadyIncognito feature.
|
||||
// The feature aims at showing SRO in an Incognito mode, where the
|
||||
// search-ready omnibox (SRO) in Incognito mode, where the
|
||||
// ZeroSuggestProvider intentionally never gets invoked.
|
||||
// The gating flag here should be removed when the SRO Incognito is
|
||||
// launched.
|
||||
providers_.push_back(
|
||||
new ZeroSuggestVerbatimMatchProvider(provider_client_.get()));
|
||||
}
|
||||
|
@ -22,19 +22,12 @@ const int kVerbatimMatchRelevanceScore = 1600;
|
||||
bool IsVerbatimMatchEligible(
|
||||
metrics::OmniboxEventProto::PageClassification context) {
|
||||
// Only offer verbatim match on a site visit and SRP (no NTP etc).
|
||||
switch (context) {
|
||||
case metrics::OmniboxEventProto::
|
||||
SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT:
|
||||
case metrics::OmniboxEventProto::
|
||||
SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT:
|
||||
return base::FeatureList::IsEnabled(
|
||||
omnibox::kOmniboxSearchReadyIncognito);
|
||||
case metrics::OmniboxEventProto::ANDROID_SEARCH_WIDGET:
|
||||
case metrics::OmniboxEventProto::OTHER:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return context == metrics::OmniboxEventProto::
|
||||
SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT ||
|
||||
context == metrics::OmniboxEventProto::
|
||||
SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT ||
|
||||
context == metrics::OmniboxEventProto::ANDROID_SEARCH_WIDGET ||
|
||||
context == metrics::OmniboxEventProto::OTHER;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -36,18 +36,12 @@ class ZeroSuggestVerbatimMatchProviderTest
|
||||
};
|
||||
|
||||
bool ZeroSuggestVerbatimMatchProviderTest::IsVerbatimMatchEligible() const {
|
||||
switch (GetParam()) {
|
||||
case metrics::OmniboxEventProto::OTHER:
|
||||
return true;
|
||||
case metrics::OmniboxEventProto::
|
||||
SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT:
|
||||
case metrics::OmniboxEventProto::
|
||||
SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT:
|
||||
return base::FeatureList::IsEnabled(
|
||||
omnibox::kOmniboxSearchReadyIncognito);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
auto param = GetParam();
|
||||
return param == metrics::OmniboxEventProto::OTHER ||
|
||||
param == metrics::OmniboxEventProto::
|
||||
SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT ||
|
||||
param == metrics::OmniboxEventProto::
|
||||
SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT;
|
||||
}
|
||||
|
||||
void ZeroSuggestVerbatimMatchProviderTest::SetUp() {
|
||||
|
@ -245,10 +245,6 @@ extern const base::Feature kMostVisitedTiles{"OmniboxMostVisitedTiles",
|
||||
const base::Feature kRichAutocompletion{"OmniboxRichAutocompletion",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
// Feature that enables Search Ready Omnibox in incognito.
|
||||
const base::Feature kOmniboxSearchReadyIncognito{
|
||||
"OmniboxSearchReadyIncognito", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
// Feature used to enable the second batch of Pedals (Safety Check, etc.).
|
||||
const base::Feature kOmniboxPedalsBatch2{"OmniboxPedalsBatch2",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
@ -64,7 +64,6 @@ extern const base::Feature kClipboardSuggestionContentHidden;
|
||||
extern const base::Feature kCompactSuggestions;
|
||||
extern const base::Feature kMostVisitedTiles;
|
||||
extern const base::Feature kRichAutocompletion;
|
||||
extern const base::Feature kOmniboxSearchReadyIncognito;
|
||||
extern const base::Feature kOmniboxPedalsBatch2;
|
||||
extern const base::Feature kOmniboxPedalsBatch2NonEnglish;
|
||||
extern const base::Feature kOmniboxPedalsDefaultIconColored;
|
||||
|
Reference in New Issue
Block a user