Index: chrome/browser/autocomplete/history_quick_provider.cc |
diff --git a/chrome/browser/autocomplete/history_quick_provider.cc b/chrome/browser/autocomplete/history_quick_provider.cc |
index 1391ca47b256e7ca294f22faf2f9495d870992ad..ea946e77aa6b7a0b7386def3812dbc8d7bfd9b9c 100644 |
--- a/chrome/browser/autocomplete/history_quick_provider.cc |
+++ b/chrome/browser/autocomplete/history_quick_provider.cc |
@@ -93,8 +93,16 @@ void HistoryQuickProvider::Start(const AutocompleteInput& input, |
void HistoryQuickProvider::DeleteMatch(const AutocompleteMatch& match) { |
Peter Kasting
2014/06/11 18:32:34
This function seems like it now just does what His
engedy
2014/06/12 08:47:59
Done. You are entirely correct. I actually feel ki
|
DCHECK(match.deletable); |
DCHECK(match.destination_url.is_valid()); |
- // Delete the match from the InMemoryURLIndex. |
+ |
+ // Delete the underlying URL along with all its visits from the history DB. |
+ HistoryService* const history_service = |
+ HistoryServiceFactory::GetForProfile(profile_, Profile::EXPLICIT_ACCESS); |
+ DCHECK(history_service); |
+ history_service->DeleteURL(match.destination_url); |
+ |
+ // Delete derived information stored about the URL in the InMemoryURLIndex. |
GetIndex()->DeleteURL(match.destination_url); |
+ |
DeleteMatchFromMatches(match); |
} |