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

Issue 7321001: Changes SearchProvider to set the description of the first consecutive (Closed)

Created:
9 years, 5 months ago by sky
Modified:
9 years, 5 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews, Paweł Hajdan Jr.
Visibility:
Public.

Description

Changes SearchProvider to set the description of the first consecutive match sharing the same template url. For example, if the results were 'A B C D' with 'A' and 'B' sharing the same provider and 'C' and 'D' sharing the same provider, then 'A' and 'C' would get descriptions. As part of this I'm always setting AutocompleteMatch::template_url (previously we only set it for keywords). BUG=88322 TEST=see bug, also covered by unit tests. R=pkasting@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=91741

Patch Set 1 #

Patch Set 2 : Tweaks #

Total comments: 6

Patch Set 3 : Incorporate review feedback and fix bug #

Patch Set 4 : Fix DCHECK #

Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -94 lines) Patch
M chrome/browser/autocomplete/autocomplete.h View 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete.cc View 1 2 3 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_edit.cc View 1 chunk +6 lines, -13 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_match.h View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_popup_model.cc View 1 2 1 chunk +24 lines, -4 lines 0 comments Download
M chrome/browser/autocomplete/search_provider.h View 2 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/autocomplete/search_provider.cc View 1 2 9 chunks +31 lines, -43 lines 0 comments Download
M chrome/browser/autocomplete/search_provider_unittest.cc View 1 7 chunks +51 lines, -7 lines 0 comments Download
M chrome/browser/instant/instant_controller.h View 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/instant/instant_controller.cc View 2 chunks +1 line, -14 lines 0 comments Download
M chrome/browser/search_engines/template_url_service.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_view_win.cc View 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
sky
I looked at http://codereview.chromium.org/6731036/ . I think we could accommodate the needs of both by ...
9 years, 5 months ago (2011-07-07 00:51:19 UTC) #1
Peter Kasting
LGTM http://codereview.chromium.org/7321001/diff/14/chrome/browser/autocomplete/autocomplete.cc File chrome/browser/autocomplete/autocomplete.cc (right): http://codereview.chromium.org/7321001/diff/14/chrome/browser/autocomplete/autocomplete.cc#newcode955 chrome/browser/autocomplete/autocomplete.cc:955: for (ACProviders::const_iterator i(providers_.begin()); i != providers_.end(); Nit: Should ...
9 years, 5 months ago (2011-07-07 01:16:07 UTC) #2
sky
9 years, 5 months ago (2011-07-07 15:34:01 UTC) #3
I incorporated all your other comments.

  -Scott

http://codereview.chromium.org/7321001/diff/14/chrome/browser/autocomplete/au...
File chrome/browser/autocomplete/autocomplete_popup_model.cc (right):

http://codereview.chromium.org/7321001/diff/14/chrome/browser/autocomplete/au...
chrome/browser/autocomplete/autocomplete_popup_model.cc:146:
autocomplete_controller()->input().text().compare(
On 2011/07/07 01:16:07, Peter Kasting wrote:
> Nit: base::StartsWith()?
> 
> Do we need to worry about upper/lowercase?

As far as I can tell no. keywords are always lowercase, and if we're in keyword
mode the first part of the text is forced to lowercase.

> Does this correctly handle "?google.com" as input that does not have a
keyword?

Yes.

Powered by Google App Engine
This is Rietveld 408576698