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

Unified Diff: chrome/browser/autocomplete/zero_suggest_provider.cc

Issue 158223002: Part 5 of search provider refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + fix indentation Created 6 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
« no previous file with comments | « chrome/browser/autocomplete/zero_suggest_provider.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/zero_suggest_provider.cc
diff --git a/chrome/browser/autocomplete/zero_suggest_provider.cc b/chrome/browser/autocomplete/zero_suggest_provider.cc
index 8f91feb4dd6f84570dfd3e3978b9afb7a2e922a8..a81079dc7b932c7c5f32f0d6aa4d108961eaf8de 100644
--- a/chrome/browser/autocomplete/zero_suggest_provider.cc
+++ b/chrome/browser/autocomplete/zero_suggest_provider.cc
@@ -84,20 +84,6 @@ void ZeroSuggestProvider::Start(const AutocompleteInput& input,
bool /*minimal_changes*/) {
}
-void ZeroSuggestProvider::Stop(bool clear_cached_results) {
- if (have_pending_request_)
- LogOmniboxZeroSuggestRequest(ZERO_SUGGEST_REQUEST_INVALIDATED);
- have_pending_request_ = false;
- fetcher_.reset();
- done_ = true;
- if (clear_cached_results) {
- query_matches_map_.clear();
- navigation_results_.clear();
- current_query_.clear();
- matches_.clear();
- }
-}
-
void ZeroSuggestProvider::ResetSession() {
// The user has started editing in the omnibox, so leave
// |field_trial_triggered_in_session_| unchanged and set
@@ -196,6 +182,20 @@ bool ZeroSuggestProvider::ShouldAppendExtraParams(
return true;
}
+void ZeroSuggestProvider::StopSuggest() {
+ if (have_pending_request_)
+ LogOmniboxZeroSuggestRequest(ZERO_SUGGEST_REQUEST_INVALIDATED);
+ have_pending_request_ = false;
+ fetcher_.reset();
+}
+
+void ZeroSuggestProvider::ClearAllResults() {
+ query_matches_map_.clear();
+ navigation_results_.clear();
+ current_query_.clear();
+ matches_.clear();
+}
+
void ZeroSuggestProvider::FillResults(const base::Value& root_val,
int* verbatim_relevance,
SuggestResults* suggest_results,
« no previous file with comments | « chrome/browser/autocomplete/zero_suggest_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698