[omnibox] Pass oft=2 to the search provider for on-clobber ZeroSuggest
This CL enables the passing oft=2 (rather than oft=1) for on-clobber
ZeroSuggest.
oft is a GET parameter for Suggest requests, which means:
oft=0 normal prefix suggestions
oft=1 on-focus
oft=2 on-clobber
We recently created the new oft=2 value, but haven't used it yet.
This is the CL that starts using it.
This is going to temporarily break it, since the server is not yet
set up to handle this yet. We will fix the server next.
Bug: 1106096
Change-Id: I2796dcc9cdb553765876f4341414d15b5e648ad1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363488
Commit-Queue: Tommy Li <[email protected]>
Reviewed-by: manuk hovanesian <[email protected]>
Cr-Commit-Position: refs/heads/master@{#799267}
diff --git a/components/omnibox/browser/zero_suggest_provider.cc b/components/omnibox/browser/zero_suggest_provider.cc
index 81183d6..1215cbd 100644
--- a/components/omnibox/browser/zero_suggest_provider.cc
+++ b/components/omnibox/browser/zero_suggest_provider.cc
@@ -235,9 +235,7 @@
TemplateURLRef::SearchTermsArgs search_terms_args;
search_terms_args.page_classification = current_page_classification_;
- // TODO(tommycli): Once AutocompleteInput supports tracking OmniboxFocusType,
- // copy the value from there.
- search_terms_args.focus_type = OmniboxFocusType::ON_FOCUS;
+ search_terms_args.focus_type = input.focus_type();
GURL suggest_url = RemoteSuggestionsService::EndpointUrl(
search_terms_args, client()->GetTemplateURLService());
if (!suggest_url.is_valid())