Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Unified Diff: components/omnibox/keyword_provider.cc

Issue 836213002: Assume all providers may give zero suggest responses. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: A style fix Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/omnibox/keyword_provider.cc
diff --git a/components/omnibox/keyword_provider.cc b/components/omnibox/keyword_provider.cc
index d8754e9f14dcf19f9c2d37b7f7349a68c93a5325..5babeccc83c94484981301521075562fe238fac5 100644
--- a/components/omnibox/keyword_provider.cc
+++ b/components/omnibox/keyword_provider.cc
@@ -199,7 +199,8 @@ AutocompleteMatch KeywordProvider::CreateVerbatimMatch(
}
void KeywordProvider::Start(const AutocompleteInput& input,
- bool minimal_changes) {
+ bool minimal_changes,
+ bool on_focus) {
// This object ensures we end keyword mode if we exit the function without
// toggling keyword mode to on.
ScopedEndExtensionKeywordMode keyword_mode_toggle(extensions_delegate_.get());
@@ -229,7 +230,7 @@ void KeywordProvider::Start(const AutocompleteInput& input,
// typed, if the user uses them enough and isn't obviously typing something
// else. In this case we'd consider all input here to be query input.
base::string16 keyword, remaining_input;
- if (!ExtractKeywordFromInput(input, &keyword, &remaining_input))
+ if (on_focus || !ExtractKeywordFromInput(input, &keyword, &remaining_input))
Peter Kasting 2015/01/07 20:16:36 Nit: I would probably do this in a separate condit
Maria 2015/01/08 07:52:38 Done.
return;
// Get the best matches for this keyword.

Powered by Google App Engine
This is Rietveld 408576698