summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/history_provider.cc
diff options
context:
space:
mode:
authormsw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-06 21:26:34 +0000
committermsw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-06 21:26:34 +0000
commit07f2a3ccc377fa9eeee25690e7e59bcce8ea57c1 (patch)
tree7e2b62a7f2214c7da5716d44db97e617f30ebe49 /chrome/browser/autocomplete/history_provider.cc
parentda49ecb10862448a28a78a88c3d66f54e9e53d0a (diff)
downloadchromium_src-07f2a3ccc377fa9eeee25690e7e59bcce8ea57c1.zip
chromium_src-07f2a3ccc377fa9eeee25690e7e59bcce8ea57c1.tar.gz
chromium_src-07f2a3ccc377fa9eeee25690e7e59bcce8ea57c1.tar.bz2
Make starred History*Provider results stay in the autocomplete dropdown, update tests.
Don't delete bookmarked AutoCompleteMatches from the dropdown list, remove their history data and hide their backing store instead. Expose HistoryProvider::DeleteMatch() and add delete tests. BUG=67822 TEST=New unit tests + Check that starred History*Provider results aren't removed from the omnibox autocomplete dropdown set of matches. Review URL: http://codereview.chromium.org/6078005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70648 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/history_provider.cc')
-rw-r--r--chrome/browser/autocomplete/history_provider.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/autocomplete/history_provider.cc b/chrome/browser/autocomplete/history_provider.cc
index 100db04..cbcf691 100644
--- a/chrome/browser/autocomplete/history_provider.cc
+++ b/chrome/browser/autocomplete/history_provider.cc
@@ -43,9 +43,9 @@ void HistoryProvider::DeleteMatch(const AutocompleteMatch& match) {
for (ACMatches::iterator i(matches_.begin()); i != matches_.end(); ++i) {
if (i->destination_url == selected_url && i->type == match.type) {
found = true;
- if (i->is_history_what_you_typed_match) {
- // We can't get rid of the What You Typed match, but we can make it
- // look like it has no backing data.
+ if (i->is_history_what_you_typed_match || i->starred) {
+ // We can't get rid of What-You-Typed or Bookmarked matches,
+ // but we can make them look like they have no backing data.
i->deletable = false;
i->description.clear();
i->description_class.clear();