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

Unified Diff: components/omnibox/keyword_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/keyword_provider.h ('k') | components/omnibox/search_provider.h » ('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 25807773a61ab932d7116e6a20c58e8b8426ab8c..13b2710637b3a60039d237bed48112b304caae41 100644
--- a/components/omnibox/keyword_provider.cc
+++ b/components/omnibox/keyword_provider.cc
@@ -317,9 +317,13 @@ void KeywordProvider::Start(const AutocompleteInput& input,
}
}
-void KeywordProvider::Stop(bool clear_cached_results) {
+void KeywordProvider::Stop(bool clear_cached_results,
+ bool due_to_user_inactivity) {
done_ = true;
- if (extensions_delegate_)
+ // Only end an extension's request if the user did something to explicitly
+ // cancel it; mere inactivity shouldn't terminate long-running extension
+ // operations since the user likely explicitly requested them.
+ if (extensions_delegate_ && !due_to_user_inactivity)
extensions_delegate_->MaybeEndExtensionKeywordMode();
}
« no previous file with comments | « components/omnibox/keyword_provider.h ('k') | components/omnibox/search_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698