Commit e0a3a99f authored by Tommy Li's avatar Tommy Li Committed by Commit Bot

[omnibox] New flag for On-Content variant of Contextual Web ZeroSuggest

This CL creates a whole new flag for the On-Content variant of
Contextual Web ZeroSuggest.

Bug: 1087700
Change-Id: I4ccb748421470e2ccd3508d69fc317e12c27ff9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2219597Reviewed-by: default avatarJustin Donnelly <jdonnelly@chromium.org>
Commit-Queue: Tommy Li <tommycli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#773346}
parent 78e9f6ee
......@@ -701,10 +701,13 @@ ZeroSuggestProvider::ResultType ZeroSuggestProvider::TypeOfResultToRun(
if (current_page_classification_ == OmniboxEventProto::CHROMEOS_APP_LIST)
return REMOTE_NO_URL;
// Contextual Open Web.
// Contextual Open Web - (same client side behavior for multiple variants).
bool contextual_web_suggestions_enabled =
base::FeatureList::IsEnabled(omnibox::kOnFocusSuggestionsContextualWeb) ||
base::FeatureList::IsEnabled(
omnibox::kOnFocusSuggestionsContextualWebOnContent);
if (current_page_classification_ == OmniboxEventProto::OTHER &&
base::FeatureList::IsEnabled(omnibox::kOnFocusSuggestionsContextualWeb) &&
can_send_current_url) {
can_send_current_url && contextual_web_suggestions_enabled) {
return REMOTE_SEND_URL;
}
......
......@@ -257,9 +257,16 @@ const base::Feature kOnFocusSuggestions{"OmniboxOnFocusSuggestions",
// Enables on-focus suggestions on the Open Web, that are contextual to the
// 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.
//
// There's multiple flags here for multiple backend configurations:
// - Default (search queries)
// - On-Content Suggestions
const base::Feature kOnFocusSuggestionsContextualWeb{
"OmniboxOnFocusSuggestionsContextualWeb",
base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kOnFocusSuggestionsContextualWebOnContent{
"OmniboxOnFocusSuggestionsContextualWebOnContent",
base::FEATURE_DISABLED_BY_DEFAULT};
// Enables Proactive ZeroSuggestions (PZPS) on the NTP, for the Omnibox and
// Realbox respectively. Note: enabling this feature merely makes
......
......@@ -60,6 +60,7 @@ extern const base::Feature kOmniboxMaxURLMatches;
// On-Focus Suggestions a.k.a. ZeroSuggest.
extern const base::Feature kOnFocusSuggestions;
extern const base::Feature kOnFocusSuggestionsContextualWeb;
extern const base::Feature kOnFocusSuggestionsContextualWebOnContent;
extern const base::Feature kProactiveZeroSuggestionsOnNTPOmnibox;
extern const base::Feature kProactiveZeroSuggestionsOnNTPRealbox;
extern const base::Feature kZeroSuggestionsOnNTP;
......
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