Commit 4b7c4182 authored by Tommy Li's avatar Tommy Li Committed by Commit Bot

[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 <tommycli@chromium.org>
Reviewed-by: default avatarmanuk hovanesian <manukh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799267}
parent f7726a63
...@@ -235,9 +235,7 @@ void ZeroSuggestProvider::Start(const AutocompleteInput& input, ...@@ -235,9 +235,7 @@ void ZeroSuggestProvider::Start(const AutocompleteInput& input,
TemplateURLRef::SearchTermsArgs search_terms_args; TemplateURLRef::SearchTermsArgs search_terms_args;
search_terms_args.page_classification = current_page_classification_; search_terms_args.page_classification = current_page_classification_;
// TODO(tommycli): Once AutocompleteInput supports tracking OmniboxFocusType, search_terms_args.focus_type = input.focus_type();
// copy the value from there.
search_terms_args.focus_type = OmniboxFocusType::ON_FOCUS;
GURL suggest_url = RemoteSuggestionsService::EndpointUrl( GURL suggest_url = RemoteSuggestionsService::EndpointUrl(
search_terms_args, client()->GetTemplateURLService()); search_terms_args, client()->GetTemplateURLService());
if (!suggest_url.is_valid()) if (!suggest_url.is_valid())
......
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