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

Unified Diff: components/omnibox/search_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/search_provider.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/search_provider.cc
diff --git a/components/omnibox/search_provider.cc b/components/omnibox/search_provider.cc
index 93cb059b5db8ece6c964d2529bab7cef101d45ad..f48be95769cb8cca10c593f8cc1df2c938620507 100644
--- a/components/omnibox/search_provider.cc
+++ b/components/omnibox/search_provider.cc
@@ -189,7 +189,8 @@ ACMatches::iterator SearchProvider::FindTopMatch(ACMatches* matches) {
}
void SearchProvider::Start(const AutocompleteInput& input,
- bool minimal_changes) {
+ bool minimal_changes,
+ bool called_due_to_focus) {
// Do our best to load the model as early as possible. This will reduce
// odds of having the model not ready when really needed (a non-empty input).
TemplateURLService* model = providers_.template_url_service();
@@ -200,7 +201,8 @@ void SearchProvider::Start(const AutocompleteInput& input,
field_trial_triggered_ = false;
// Can't return search/suggest results for bogus input.
- if (input.type() == metrics::OmniboxInputType::INVALID) {
+ if (called_due_to_focus ||
+ input.type() == metrics::OmniboxInputType::INVALID) {
Stop(true);
return;
}
« no previous file with comments | « components/omnibox/search_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698