Chromium Code Reviews| Index: chrome/browser/autocomplete/search_provider.cc |
| diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc |
| index 25d08c0047505874e5484d05ee0bb8303af42dae..833d6665ccbe61ed12cfd335ea16b1c9aae9defc 100644 |
| --- a/chrome/browser/autocomplete/search_provider.cc |
| +++ b/chrome/browser/autocomplete/search_provider.cc |
| @@ -404,14 +404,6 @@ void SearchProvider::Start(const AutocompleteInput& input, |
| UpdateMatches(); |
| } |
| -void SearchProvider::Stop(bool clear_cached_results) { |
| - StopSuggest(); |
| - done_ = true; |
| - |
| - if (clear_cached_results) |
| - ClearAllResults(); |
| -} |
| - |
| void SearchProvider::OnURLFetchComplete(const net::URLFetcher* source) { |
| DCHECK(!done_); |
| suggest_results_pending_--; |
| @@ -493,6 +485,23 @@ bool SearchProvider::ShouldAppendExtraParams( |
| providers_.default_provider().empty(); |
| } |
| +void SearchProvider::StopSuggest() { |
| + // Increment the appropriate field in the histogram by the number of |
| + // pending requests that were invalidated. |
| + for (int i = 0; i < suggest_results_pending_; i++) |
|
H Fung
2014/02/14 00:43:07
++i?
Maria
2014/02/14 02:37:30
Done.
|
| + LogOmniboxSuggestRequest(REQUEST_INVALIDATED); |
| + suggest_results_pending_ = 0; |
| + timer_.Stop(); |
| + // Stop any in-progress URL fetches. |
| + keyword_fetcher_.reset(); |
| + default_fetcher_.reset(); |
| +} |
| + |
| +void SearchProvider::ClearAllResults() { |
| + keyword_results_.Clear(); |
| + default_results_.Clear(); |
| +} |
| + |
| void SearchProvider::OnDeletionComplete(bool success, |
| SuggestionDeletionHandler* handler) { |
| RecordDeletionResult(success); |
| @@ -711,23 +720,6 @@ bool SearchProvider::IsQuerySuitableForSuggest() const { |
| return true; |
| } |
| -void SearchProvider::StopSuggest() { |
| - // Increment the appropriate field in the histogram by the number of |
| - // pending requests that were invalidated. |
| - for (int i = 0; i < suggest_results_pending_; i++) |
| - LogOmniboxSuggestRequest(REQUEST_INVALIDATED); |
| - suggest_results_pending_ = 0; |
| - timer_.Stop(); |
| - // Stop any in-progress URL fetches. |
| - keyword_fetcher_.reset(); |
| - default_fetcher_.reset(); |
| -} |
| - |
| -void SearchProvider::ClearAllResults() { |
| - keyword_results_.Clear(); |
| - default_results_.Clear(); |
| -} |
| - |
| void SearchProvider::RemoveAllStaleResults() { |
| // We only need to remove stale results (which ensures the top-scoring |
| // match is inlineable) if the user is not in reorder mode. In reorder |