Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Issue 10381121: Add SearchProvider's most relevant NavigationResult to |matches_|. (Closed)

Created:
8 years, 7 months ago by msw
Modified:
8 years, 7 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews, James Su
Visibility:
Public.

Description

Add SearchProvider's most relevant NavigationResult to |matches_|. This fixes a regression from http://crrev.com/135984. The reversed result parsing unintentionally left the nav results unsorted. Suggest results are unaffected, as they're all added to map and sorted. Subsequent CLs should help make this whole process cleaner. BUG=125871 TEST=Automated. Also, the *first* NAVIGATION result from suggest JSON is used as a SearchProvider match. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=137080

Patch Set 1 #

Patch Set 2 : Update SearchProviderTest.Navsuggest with test case. #

Total comments: 2

Patch Set 3 : Use max_element instead of sorting results. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -11 lines) Patch
M chrome/browser/autocomplete/search_provider.cc View 1 2 1 chunk +7 lines, -5 lines 0 comments Download
M chrome/browser/autocomplete/search_provider_unittest.cc View 1 2 chunks +7 lines, -6 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
msw
Update SearchProviderTest.Navsuggest with test case.
8 years, 7 months ago (2012-05-12 01:44:47 UTC) #1
msw
Hey Peter, please take a look as you have time; thanks!
8 years, 7 months ago (2012-05-12 01:49:47 UTC) #2
Peter Kasting
LGTM with one change https://chromiumcodereview.appspot.com/10381121/diff/2001/chrome/browser/autocomplete/search_provider.cc File chrome/browser/autocomplete/search_provider.cc (right): https://chromiumcodereview.appspot.com/10381121/diff/2001/chrome/browser/autocomplete/search_provider.cc#newcode662 chrome/browser/autocomplete/search_provider.cc:662: std::stable_sort(navigation_results.begin(), navigation_results.end(), Use std::max_element() instead ...
8 years, 7 months ago (2012-05-14 20:29:19 UTC) #3
msw
Done; I'll land with green try jobs, but feel free to take another look. https://chromiumcodereview.appspot.com/10381121/diff/2001/chrome/browser/autocomplete/search_provider.cc ...
8 years, 7 months ago (2012-05-15 01:00:29 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/10381121/9001
8 years, 7 months ago (2012-05-15 03:03:59 UTC) #5
commit-bot: I haz the power
8 years, 7 months ago (2012-05-15 05:21:15 UTC) #6
Change committed as 137080

Powered by Google App Engine
This is Rietveld 408576698