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

[omnibox] Discourage keyword matches in NTP realbox

NTP realbox does not have the UI facilities to handle keyword matches,
especially of the explicitly-substituting form
"google.com search terms here".

This discourages their appearance in the same way Android does, by
disallowing exact keyword matches.

I think this will suppress them to the exact same extent they are
suppressed on Android.

Bug: 1021793
Change-Id: I75784f58f4474f166e0bcd05ebd871d77ff5e7ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2079335Reviewed-by: default avatarMoe Ahmadi <mahmadi@chromium.org>
Commit-Queue: Tommy Li <tommycli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#745239}
parent 6cce6fba
...@@ -656,6 +656,12 @@ void SearchTabHelper::QueryAutocomplete(const base::string16& input, ...@@ -656,6 +656,12 @@ void SearchTabHelper::QueryAutocomplete(const base::string16& input,
autocomplete_input.set_from_omnibox_focus(input.empty()); autocomplete_input.set_from_omnibox_focus(input.empty());
autocomplete_input.set_prevent_inline_autocomplete( autocomplete_input.set_prevent_inline_autocomplete(
prevent_inline_autocomplete); prevent_inline_autocomplete);
// We do not want keyword matches for the NTP realbox, which has no UI
// facilities to support them.
autocomplete_input.set_prefer_keyword(false);
autocomplete_input.set_allow_exact_keyword_match(false);
autocomplete_controller_->Start(autocomplete_input); autocomplete_controller_->Start(autocomplete_input);
} }
......
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