Index: chrome/browser/autocomplete/history_provider.cc |
diff --git a/chrome/browser/autocomplete/history_provider.cc b/chrome/browser/autocomplete/history_provider.cc |
index 7474ce7e7ea27d3f51030d225e73cb7147843793..0fa0811742cda883c227f199dbfe038701e2fb5d 100644 |
--- a/chrome/browser/autocomplete/history_provider.cc |
+++ b/chrome/browser/autocomplete/history_provider.cc |
@@ -40,29 +40,6 @@ void HistoryProvider::DeleteMatch(const AutocompleteMatch& match) { |
DeleteMatchFromMatches(match); |
} |
-HistoryProvider::~HistoryProvider() {} |
- |
-void HistoryProvider::DeleteMatchFromMatches(const AutocompleteMatch& match) { |
- bool found = false; |
- for (ACMatches::iterator i(matches_.begin()); i != matches_.end(); ++i) { |
- if (i->destination_url == match.destination_url && i->type == match.type) { |
- found = true; |
- 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(); |
- } else { |
- matches_.erase(i); |
- } |
- break; |
- } |
- } |
- DCHECK(found) << "Asked to delete a URL that isn't in our set of matches"; |
- listener_->OnProviderUpdate(true); |
-} |
- |
// static |
bool HistoryProvider::FixupUserInput(AutocompleteInput* input) { |
const base::string16& input_text = input->text(); |
@@ -134,6 +111,29 @@ bool HistoryProvider::FixupUserInput(AutocompleteInput* input) { |
return !output.empty(); |
} |
+HistoryProvider::~HistoryProvider() {} |
+ |
+void HistoryProvider::DeleteMatchFromMatches(const AutocompleteMatch& match) { |
+ bool found = false; |
+ for (ACMatches::iterator i(matches_.begin()); i != matches_.end(); ++i) { |
+ if (i->destination_url == match.destination_url && i->type == match.type) { |
+ found = true; |
+ 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(); |
+ } else { |
+ matches_.erase(i); |
+ } |
+ break; |
+ } |
+ } |
+ DCHECK(found) << "Asked to delete a URL that isn't in our set of matches"; |
+ listener_->OnProviderUpdate(true); |
+} |
+ |
// static |
size_t HistoryProvider::TrimHttpPrefix(base::string16* url) { |
// Find any "http:". |
@@ -191,4 +191,3 @@ ACMatchClassifications HistoryProvider::SpansFromTermMatch( |
return spans; |
} |
- |