summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/history_quick_provider.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/autocomplete/history_quick_provider.cc')
-rw-r--r--chrome/browser/autocomplete/history_quick_provider.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/autocomplete/history_quick_provider.cc b/chrome/browser/autocomplete/history_quick_provider.cc
index 3bb2c32..e098f67 100644
--- a/chrome/browser/autocomplete/history_quick_provider.cc
+++ b/chrome/browser/autocomplete/history_quick_provider.cc
@@ -147,8 +147,13 @@ void HistoryQuickProvider::Start(const AutocompleteInput& input,
}
}
-// TODO(mrossetti): Implement this function. (Will happen in next CL.)
-void HistoryQuickProvider::DeleteMatch(const AutocompleteMatch& match) {}
+void HistoryQuickProvider::DeleteMatch(const AutocompleteMatch& match) {
+ DCHECK(match.deletable);
+ DCHECK(match.destination_url.is_valid());
+ // Delete the match from the InMemoryURLIndex.
+ GetIndex()->DeleteURL(match.destination_url);
+ DeleteMatchFromMatches(match);
+}
HistoryQuickProvider::~HistoryQuickProvider() {}