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

Unified Diff: components/omnibox/search_provider.cc

Issue 985503002: Omnibox - Make Omnibox Extensions Ignore Stop() Calls Due to User Idleness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make unit tests compile Created 5 years, 9 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 a5f865ac74417ef148300a583ed3f52aaee66620..e140fc5a575e247e58a102357cafabf94aed637f 100644
--- a/components/omnibox/search_provider.cc
+++ b/components/omnibox/search_provider.cc
@@ -203,7 +203,7 @@ void SearchProvider::Start(const AutocompleteInput& input,
// Can't return search/suggest results for bogus input.
if (called_due_to_focus ||
input.type() == metrics::OmniboxInputType::INVALID) {
- Stop(true);
+ Stop(true, false);
return;
}
@@ -226,7 +226,7 @@ void SearchProvider::Start(const AutocompleteInput& input,
if (!default_provider && !keyword_provider) {
// No valid providers.
- Stop(true);
+ Stop(true, false);
return;
}
@@ -240,7 +240,7 @@ void SearchProvider::Start(const AutocompleteInput& input,
!providers_.equal(default_provider_keyword, keyword_provider_keyword)) {
// Cancel any in-flight suggest requests.
if (!done_)
- Stop(false);
+ Stop(false, false);
}
providers_.set(default_provider_keyword, keyword_provider_keyword);
@@ -258,7 +258,7 @@ void SearchProvider::Start(const AutocompleteInput& input,
match.allowed_to_be_default_match = true;
matches_.push_back(match);
}
- Stop(true);
+ Stop(true, false);
return;
}
@@ -286,7 +286,8 @@ void SearchProvider::Start(const AutocompleteInput& input,
UpdateMatches();
}
-void SearchProvider::Stop(bool clear_cached_results) {
+void SearchProvider::Stop(bool clear_cached_results,
+ bool due_to_user_inactivity) {
StopSuggest();
done_ = true;
« 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