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

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: Created 5 years, 10 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 25807773a61ab932d7116e6a20c58e8b8426ab8c..dcabaf6231ed9f3dc3dcc3f0ad932a11a44346c3 100644
--- a/components/omnibox/keyword_provider.cc
+++ b/components/omnibox/keyword_provider.cc
@@ -317,9 +317,12 @@ void KeywordProvider::Start(const AutocompleteInput& input,
}
}
-void KeywordProvider::Stop(bool clear_cached_results) {
+void KeywordProvider::Stop(bool clear_cached_results,
+ bool user_inactivity_timer) {
done_ = true;
- if (extensions_delegate_)
+ // Only end an extensions request if the user did something explicitly
Peter Kasting 2015/03/05 23:27:28 Nit: extension's; explicitly to -> to explicitly
Mark P 2015/03/06 21:24:34 Did both.
+ // to cancel it; the inactivity timer does not count.
Peter Kasting 2015/03/05 23:27:28 Nit: does not count -> shouldn't terminate long-ru
Mark P 2015/03/06 21:24:34 Done (with minor edits).
+ if (extensions_delegate_ && !user_inactivity_timer)
extensions_delegate_->MaybeEndExtensionKeywordMode();
}

Powered by Google App Engine
This is Rietveld 408576698