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

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

Issue 329073003: Make HistoryQuickProvider::DeleteMatch also delete the underlying URL from the History Database. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 6 years, 6 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 | chrome/browser/autocomplete/history_quick_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/history_provider.cc
diff --git a/chrome/browser/autocomplete/history_provider.cc b/chrome/browser/autocomplete/history_provider.cc
index 665f80b81df66f095a5b2e7df4460eed402bf56a..0018b47903242a1603f652fbad2c5ce300f649cb 100644
--- a/chrome/browser/autocomplete/history_provider.cc
+++ b/chrome/browser/autocomplete/history_provider.cc
@@ -26,10 +26,13 @@ void HistoryProvider::DeleteMatch(const AutocompleteMatch& match) {
HistoryService* const history_service =
HistoryServiceFactory::GetForProfile(profile_, Profile::EXPLICIT_ACCESS);
- // Delete the match from the history DB.
+ // Delete the underlying URL along with all its visits from the history DB.
+ // The resulting HISTORY_URLS_DELETED notification will also cause all caches
+ // and indices to drop any data they might have stored pertaining to the URL.
DCHECK(history_service);
DCHECK(match.destination_url.is_valid());
history_service->DeleteURL(match.destination_url);
+
DeleteMatchFromMatches(match);
}
« no previous file with comments | « no previous file | chrome/browser/autocomplete/history_quick_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698