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

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

Issue 14267032: Omnibox: HistoryContents Shouldn't *Always* Clear Results on Stop() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/history_contents_provider.cc
diff --git a/chrome/browser/autocomplete/history_contents_provider.cc b/chrome/browser/autocomplete/history_contents_provider.cc
index 190d0a3afc85bbd3186f5ca0caeda03bd8bdfa81..3e097232de74dc4cff341146b2d4295693f41560 100644
--- a/chrome/browser/autocomplete/history_contents_provider.cc
+++ b/chrome/browser/autocomplete/history_contents_provider.cc
@@ -152,9 +152,11 @@ void HistoryContentsProvider::Stop(bool clear_cached_results) {
request_consumer_.CancelAllRequests();
// Clear the results. We swap in an empty one as the easy way to clear it.
- history::QueryResults empty_results;
- results_.Swap(&empty_results);
- have_results_ = false;
+ if (clear_cached_results) {
+ history::QueryResults empty_results;
+ results_.Swap(&empty_results);
+ have_results_ = false;
+ }
}
HistoryContentsProvider::~HistoryContentsProvider() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698