Commit 5b899dc7 authored by stkhapugin@chromium.org's avatar stkhapugin@chromium.org Committed by Commit Bot

Disable ZeroSuggest provider for shortcuts experiment.

Moves the shortcuts experiment flag from iOS-only list to omnibox flags,
and disables ZeroSuggest provider when it's on.

Bug: 884687
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: Iaa709a78b0ae0a5862edec457ec0f2555e45dced
Reviewed-on: https://chromium-review.googlesource.com/1233454Reviewed-by: default avatarMark Pearson <mpearson@chromium.org>
Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Commit-Queue: Stepan Khapugin <stkhapugin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595767}
parent 00fbc74a
......@@ -191,6 +191,13 @@ const base::Feature kBreakWordsAtUnderscores{"OmniboxBreakWordsAtUnderscores",
// Feature used to fetch document suggestions.
const base::Feature kDocumentProvider{"OmniboxDocumentProvider",
base::FEATURE_DISABLED_BY_DEFAULT};
// Feature to replace the standard ZeroSuggest with icons for most visited sites
// and collections (bookmarks, history, recent tabs, reading list). Only
// available on iOS.
const base::Feature kOmniboxPopupShortcutIconsInZeroState{
"OmniboxPopupShortcutIconsInZeroState", base::FEATURE_DISABLED_BY_DEFAULT};
} // namespace omnibox
namespace {
......
......@@ -47,6 +47,7 @@ extern const base::Feature kUIExperimentVerticalMargin;
extern const base::Feature kSpeculativeServiceWorkerStartOnQueryInput;
extern const base::Feature kBreakWordsAtUnderscores;
extern const base::Feature kDocumentProvider;
extern const base::Feature kOmniboxPopupShortcutIconsInZeroState;
} // namespace omnibox
......
......@@ -526,6 +526,11 @@ bool ZeroSuggestProvider::AllowZeroSuggestSuggestions(
if (client()->IsOffTheRecord())
return false;
if (base::FeatureList::IsEnabled(
omnibox::kOmniboxPopupShortcutIconsInZeroState)) {
return false;
}
// Only show zero suggest for pages with URLs the user will recognize
// if it is not running in ChromeOS app_list context.
// This list intentionally does not include items such as ftp: and file:
......
......@@ -363,9 +363,11 @@ const flags_ui::FeatureEntry kFeatureEntries[] = {
{"toolbar-container", flag_descriptions::kToolbarContainerName,
flag_descriptions::kToolbarContainerDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(toolbar_container::kToolbarContainerEnabled)},
{"omnibox-popup-shortcuts", flag_descriptions::kOmniboxPopupShortcutsName,
flag_descriptions::kOmniboxPopupShortcutsDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(kOmniboxPopupShortcuts)},
{"omnibox-popup-shortcuts",
flag_descriptions::kOmniboxPopupShortcutIconsInZeroStateName,
flag_descriptions::kOmniboxPopupShortcutIconsInZeroStateDescription,
flags_ui::kOsIos,
FEATURE_VALUE_TYPE(omnibox::kOmniboxPopupShortcutIconsInZeroState)},
{"sso-with-wkwebview", flag_descriptions::kSSOWithWKWebViewName,
flag_descriptions::kSSOWithWKWebViewDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(kSSOWithWKWebView)},
......
......@@ -203,8 +203,9 @@ const char kNewPasswordFormParsingDescription[] =
"currently under development. WARNING: when enabled Password Manager might "
"stop working";
const char kOmniboxPopupShortcutsName[] = "Show zero-state omnibox shortcuts";
const char kOmniboxPopupShortcutsDescription[] =
const char kOmniboxPopupShortcutIconsInZeroStateName[] =
"Show zero-state omnibox shortcuts";
const char kOmniboxPopupShortcutIconsInZeroStateDescription[] =
"Instead of ZeroSuggest, show most visited sites and collection shortcuts "
"in the omnibox popup.";
......
......@@ -167,8 +167,8 @@ extern const char kNewPasswordFormParsingDescription[];
// Title and description for the flag to show most visited sites and collection
// shortcuts in the omnibox popup instead of ZeroSuggest.
extern const char kOmniboxPopupShortcutsName[];
extern const char kOmniboxPopupShortcutsDescription[];
extern const char kOmniboxPopupShortcutIconsInZeroStateName[];
extern const char kOmniboxPopupShortcutIconsInZeroStateDescription[];
// Title and description for the flag to enable elision of the URL path, query,
// and ref in omnibox URL suggestions.
......
......@@ -9,7 +9,7 @@ const base::Feature kFirstResponderKeyWindow{"FirstResponderKeyWindow",
const base::Feature kCopyImage{"CopyImage", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kOmniboxPopupShortcuts{"OmniboxPopupShortcuts",
base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kOmniboxPopupShortcutIconsInZeroState{
"OmniboxPopupShortcutIconsInZeroState", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kWKWebViewSnapshots{"WKWebViewSnapshots",
base::FEATURE_DISABLED_BY_DEFAULT};
......@@ -17,7 +17,7 @@ extern const base::Feature kCopyImage;
// Feature to show most visited sites and collection shortcuts in the omnibox
// popup instead of ZeroSuggest.
extern const base::Feature kOmniboxPopupShortcuts;
extern const base::Feature kOmniboxPopupShortcutIconsInZeroState;
// Used to enable using the WKWebView snapshotting API for iOS 11+.
extern const base::Feature kWKWebViewSnapshots;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment