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

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: Fix compilation issue in athena 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
« no previous file with comments | « components/omnibox/keyword_provider.h ('k') | components/omnibox/keyword_provider_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/keyword_provider.cc
diff --git a/components/omnibox/keyword_provider.cc b/components/omnibox/keyword_provider.cc
index d8754e9f14dcf19f9c2d37b7f7349a68c93a5325..25807773a61ab932d7116e6a20c58e8b8426ab8c 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 called_due_to_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());
@@ -215,6 +216,9 @@ void KeywordProvider::Start(const AutocompleteInput& input,
extensions_delegate_->IncrementInputId();
}
+ if (called_due_to_focus)
+ return;
+
// Split user input into a keyword and some query input.
//
// We want to suggest keywords even when users have started typing URLs, on
« no previous file with comments | « components/omnibox/keyword_provider.h ('k') | components/omnibox/keyword_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698