Index: chrome/browser/autocomplete/autocomplete.cc |
diff --git a/chrome/browser/autocomplete/autocomplete.cc b/chrome/browser/autocomplete/autocomplete.cc |
index 40ad6d26fdc8f1460cc024c4eaf4e265b490de1d..ab72ec2655f1cf466bf5a063083f42279272bd72 100644 |
--- a/chrome/browser/autocomplete/autocomplete.cc |
+++ b/chrome/browser/autocomplete/autocomplete.cc |
@@ -506,6 +506,9 @@ void AutocompleteProvider::Stop() { |
void AutocompleteProvider::DeleteMatch(const AutocompleteMatch& match) { |
} |
+void AutocompleteProvider::PostProcessResult(AutocompleteResult* result) { |
+} |
+ |
AutocompleteProvider::~AutocompleteProvider() { |
Stop(); |
} |
@@ -949,6 +952,14 @@ void AutocompleteController::UpdateResult(bool is_synchronous_pass) { |
result_.CopyOldMatches(input_, last_result); |
} |
+ size_t start_size = result_.size(); |
+ for (ACProviders::const_iterator i(providers_.begin()); i != providers_.end(); |
+ ++i) |
+ (*i)->PostProcessResult(&result_); |
+ // Providers should not alter the number of matches, otherwise it's very |
+ // likely the matches are no longer sorted. |
+ DCHECK_EQ(start_size, result_.size()); |
+ |
bool notify_default_match = is_synchronous_pass; |
if (!is_synchronous_pass) { |
const bool last_default_was_valid = |