Index: chrome/browser/autocomplete/search_provider.cc |
diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc |
index d6d34d7065aaa76392d61df85747d722eabdd935..ac844810e8c2e7f04ba03ce0b801bcf60ff70465 100644 |
--- a/chrome/browser/autocomplete/search_provider.cc |
+++ b/chrome/browser/autocomplete/search_provider.cc |
@@ -657,12 +657,13 @@ void SearchProvider::ConvertResultsToAutocompleteMatches() { |
} |
void SearchProvider::AddNavigationResultsToMatches( |
- const NavigationResults& navigation_results, |
+ NavigationResults navigation_results, |
bool is_keyword) { |
+ std::stable_sort(navigation_results.begin(), navigation_results.end(), |
Peter Kasting
2012/05/14 20:29:19
Use std::max_element() instead of sorting and then
msw
2012/05/15 01:00:29
Done.
|
+ CompareScoredResults()); |
if (!navigation_results.empty()) { |
- // TODO(kochi): http://b/1170574 We add only one results for navigational |
- // suggestions. If we can get more useful information about the score, |
- // consider adding more results. |
+ // TODO(kochi|msw): Add more navigational results if they get more |
+ // meaningful relevance values; see http://b/1170574. |
matches_.push_back( |
NavigationToMatch(navigation_results.front(), is_keyword)); |
} |