summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/history_provider.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/autocomplete/history_provider.cc')
-rw-r--r--chrome/browser/autocomplete/history_provider.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/autocomplete/history_provider.cc b/chrome/browser/autocomplete/history_provider.cc
index 665f80b..0018b47 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);
}