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

Issue 158053002: Part 4 of search provider refactoring. (Closed)

Created:
6 years, 10 months ago by Maria
Modified:
6 years, 10 months ago
Reviewers:
H Fung, msw, Mark P
CC:
chromium-reviews, James Su
Visibility:
Public.

Description

Part 4 of search provider refactoring. Moves AddMatchToMap method to the common base class. Adds method parameters so that both SearchProvider and ZeroSuggestProvider can use this method. For SearchProvider this is a pure refactoring. I added some helper classes in SearchProvider to avoid duplicating code. For ZeroSuggestProvider, this introduces some additional functionality on top of what it used to have. Mainly the method may record additional metadata on the AutocompleteMatch. This metadata is not currently used by zero suggest provider and as far as I can tell will not in any way affect the operation of zero suggest provider today. In the future, some of the metadata recorded will actually be useful (e.g. I am planning to take advantage of deletion_url). BUG=338955 TBR=mpearson Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=251236

Patch Set 1 #

Patch Set 2 : Fix up comments and formatting #

Patch Set 3 : Rebase #

Total comments: 18

Patch Set 4 : Addressed comments #

Total comments: 4

Patch Set 5 : Remove static comment #

Total comments: 28

Patch Set 6 : Moved GetInput/GetTemplateURL into superclass #

Patch Set 7 : Fixed some nits #

Total comments: 19

Patch Set 8 : Fixed up comments #

Total comments: 4

Patch Set 9 : Remove copying of suggestion #

Patch Set 10 : Don't copy suggestion #

Unified diffs Side-by-side diffs Delta from patch set Stats (+221 lines, -210 lines) Patch
M chrome/browser/autocomplete/base_search_provider.h View 1 2 3 4 5 6 7 4 chunks +50 lines, -5 lines 0 comments Download
M chrome/browser/autocomplete/base_search_provider.cc View 1 2 3 4 5 6 7 9 chunks +99 lines, -5 lines 0 comments Download
M chrome/browser/autocomplete/search_provider.h View 1 2 3 4 5 4 chunks +8 lines, -33 lines 0 comments Download
M chrome/browser/autocomplete/search_provider.cc View 1 2 3 4 5 6 7 9 chunks +24 lines, -109 lines 0 comments Download
M chrome/browser/autocomplete/zero_suggest_provider.h View 1 2 3 4 5 6 7 2 chunks +10 lines, -16 lines 0 comments Download
M chrome/browser/autocomplete/zero_suggest_provider.cc View 1 2 3 4 5 6 7 8 3 chunks +30 lines, -42 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
Maria
6 years, 10 months ago (2014-02-08 00:25:28 UTC) #1
H Fung
I think you may want to see if Mark wants to review this once since ...
6 years, 10 months ago (2014-02-08 01:02:00 UTC) #2
Maria
Mark, This particular change actually involves modifying zero suggest provider functionality (in a way that ...
6 years, 10 months ago (2014-02-08 02:13:11 UTC) #3
Mark P
On 2014/02/08 02:13:11, Maria wrote: > Mark, > > This particular change actually involves modifying ...
6 years, 10 months ago (2014-02-10 23:25:38 UTC) #4
Mark P
oops, forgot to publish the comments: https://codereview.chromium.org/158053002/diff/70001/chrome/browser/autocomplete/base_search_provider.cc File chrome/browser/autocomplete/base_search_provider.cc (right): https://codereview.chromium.org/158053002/diff/70001/chrome/browser/autocomplete/base_search_provider.cc#newcode266 chrome/browser/autocomplete/base_search_provider.cc:266: const char BaseSearchProvider::kRelevanceFromServerKey[] ...
6 years, 10 months ago (2014-02-10 23:25:55 UTC) #5
Maria
https://codereview.chromium.org/158053002/diff/70001/chrome/browser/autocomplete/base_search_provider.cc File chrome/browser/autocomplete/base_search_provider.cc (right): https://codereview.chromium.org/158053002/diff/70001/chrome/browser/autocomplete/base_search_provider.cc#newcode437 chrome/browser/autocomplete/base_search_provider.cc:437: AutocompleteMatch match = CreateSearchSuggestion(this, input, query_string, On 2014/02/10 23:25:55, ...
6 years, 10 months ago (2014-02-11 01:22:09 UTC) #6
H Fung
On 2014/02/11 01:22:09, Maria wrote: > https://codereview.chromium.org/158053002/diff/70001/chrome/browser/autocomplete/base_search_provider.cc > File chrome/browser/autocomplete/base_search_provider.cc (right): > > https://codereview.chromium.org/158053002/diff/70001/chrome/browser/autocomplete/base_search_provider.cc#newcode437 > ...
6 years, 10 months ago (2014-02-11 02:08:27 UTC) #7
Mark P
On Mon, Feb 10, 2014 at 5:22 PM, <mariakhomenko@chromium.org> wrote: > > https://codereview.chromium.org/158053002/diff/70001/ > chrome/browser/autocomplete/base_search_provider.cc ...
6 years, 10 months ago (2014-02-11 18:29:25 UTC) #8
Maria
Made changes as discussed. Also the difference in behaviour, I was referring to in the ...
6 years, 10 months ago (2014-02-11 21:42:32 UTC) #9
H Fung
I need to look at this code some more, but a couple comments for now. ...
6 years, 10 months ago (2014-02-12 03:17:48 UTC) #10
Maria
https://codereview.chromium.org/158053002/diff/230001/chrome/browser/autocomplete/base_search_provider.cc File chrome/browser/autocomplete/base_search_provider.cc (right): https://codereview.chromium.org/158053002/diff/230001/chrome/browser/autocomplete/base_search_provider.cc#newcode62 chrome/browser/autocomplete/base_search_provider.cc:62: // static On 2014/02/12 03:17:49, H Fung wrote: > ...
6 years, 10 months ago (2014-02-12 19:00:02 UTC) #11
Mark P
I think this new version is much better. In fact, it looks good to me. ...
6 years, 10 months ago (2014-02-12 23:35:48 UTC) #12
H Fung
I don't think I have much more comments. https://codereview.chromium.org/158053002/diff/280001/chrome/browser/autocomplete/search_provider.h File chrome/browser/autocomplete/search_provider.h (right): https://codereview.chromium.org/158053002/diff/280001/chrome/browser/autocomplete/search_provider.h#newcode283 chrome/browser/autocomplete/search_provider.h:283: const ...
6 years, 10 months ago (2014-02-13 01:43:32 UTC) #13
Mark P
https://codereview.chromium.org/158053002/diff/280001/chrome/browser/autocomplete/zero_suggest_provider.cc File chrome/browser/autocomplete/zero_suggest_provider.cc (right): https://codereview.chromium.org/158053002/diff/280001/chrome/browser/autocomplete/zero_suggest_provider.cc#newcode273 chrome/browser/autocomplete/zero_suggest_provider.cc:273: const SuggestResult suggestion( On 2014/02/13 01:43:33, H Fung wrote: ...
6 years, 10 months ago (2014-02-13 01:45:30 UTC) #14
msw
https://codereview.chromium.org/158053002/diff/280001/chrome/browser/autocomplete/base_search_provider.h File chrome/browser/autocomplete/base_search_provider.h (right): https://codereview.chromium.org/158053002/diff/280001/chrome/browser/autocomplete/base_search_provider.h#newcode302 chrome/browser/autocomplete/base_search_provider.h:302: bool append_extra_query_params); With the new ShouldAppendExtraParams helper, this argument ...
6 years, 10 months ago (2014-02-13 02:43:50 UTC) #15
Maria
Addressed comments. PTAL. https://codereview.chromium.org/158053002/diff/280001/chrome/browser/autocomplete/base_search_provider.cc File chrome/browser/autocomplete/base_search_provider.cc (right): https://codereview.chromium.org/158053002/diff/280001/chrome/browser/autocomplete/base_search_provider.cc#newcode459 chrome/browser/autocomplete/base_search_provider.cc:459: // Try to add |match| to ...
6 years, 10 months ago (2014-02-13 21:07:36 UTC) #16
msw
LGTM with nits. https://codereview.chromium.org/158053002/diff/280001/chrome/browser/autocomplete/base_search_provider.h File chrome/browser/autocomplete/base_search_provider.h (right): https://codereview.chromium.org/158053002/diff/280001/chrome/browser/autocomplete/base_search_provider.h#newcode302 chrome/browser/autocomplete/base_search_provider.h:302: bool append_extra_query_params); On 2014/02/13 21:07:36, Maria ...
6 years, 10 months ago (2014-02-13 22:47:18 UTC) #17
H Fung
lgtm Thanks for cleaning up the code. https://codereview.chromium.org/158053002/diff/430001/chrome/browser/autocomplete/base_search_provider.h File chrome/browser/autocomplete/base_search_provider.h (right): https://codereview.chromium.org/158053002/diff/430001/chrome/browser/autocomplete/base_search_provider.h#newcode338 chrome/browser/autocomplete/base_search_provider.h:338: // Creates ...
6 years, 10 months ago (2014-02-13 22:52:39 UTC) #18
Mark P
https://codereview.chromium.org/158053002/diff/430001/chrome/browser/autocomplete/base_search_provider.h File chrome/browser/autocomplete/base_search_provider.h (right): https://codereview.chromium.org/158053002/diff/430001/chrome/browser/autocomplete/base_search_provider.h#newcode348 chrome/browser/autocomplete/base_search_provider.h:348: // Returns the TemplateURL based on whether the |result| ...
6 years, 10 months ago (2014-02-13 23:01:52 UTC) #19
msw
https://codereview.chromium.org/158053002/diff/430001/chrome/browser/autocomplete/base_search_provider.h File chrome/browser/autocomplete/base_search_provider.h (right): https://codereview.chromium.org/158053002/diff/430001/chrome/browser/autocomplete/base_search_provider.h#newcode353 chrome/browser/autocomplete/base_search_provider.h:353: // Returns the AutocompleteInput based on whether the |result| ...
6 years, 10 months ago (2014-02-13 23:04:48 UTC) #20
Maria
https://codereview.chromium.org/158053002/diff/430001/chrome/browser/autocomplete/base_search_provider.cc File chrome/browser/autocomplete/base_search_provider.cc (right): https://codereview.chromium.org/158053002/diff/430001/chrome/browser/autocomplete/base_search_provider.cc#newcode429 chrome/browser/autocomplete/base_search_provider.cc:429: // Android and iOS have no InstantService On 2014/02/13 ...
6 years, 10 months ago (2014-02-13 23:19:23 UTC) #21
Maria
The CQ bit was checked by mariakhomenko@chromium.org
6 years, 10 months ago (2014-02-13 23:20:33 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mariakhomenko@chromium.org/158053002/560001
6 years, 10 months ago (2014-02-13 23:23:48 UTC) #23
msw
Still LGTM, but I have two more minor nits. https://codereview.chromium.org/158053002/diff/560001/chrome/browser/autocomplete/zero_suggest_provider.cc File chrome/browser/autocomplete/zero_suggest_provider.cc (right): https://codereview.chromium.org/158053002/diff/560001/chrome/browser/autocomplete/zero_suggest_provider.cc#newcode189 chrome/browser/autocomplete/zero_suggest_provider.cc:189: ...
6 years, 10 months ago (2014-02-13 23:27:53 UTC) #24
Maria
The CQ bit was unchecked by mariakhomenko@chromium.org
6 years, 10 months ago (2014-02-13 23:30:43 UTC) #25
Maria
https://codereview.chromium.org/158053002/diff/560001/chrome/browser/autocomplete/zero_suggest_provider.cc File chrome/browser/autocomplete/zero_suggest_provider.cc (right): https://codereview.chromium.org/158053002/diff/560001/chrome/browser/autocomplete/zero_suggest_provider.cc#newcode189 chrome/browser/autocomplete/zero_suggest_provider.cc:189: input.UpdateText(base::string16(result.suggestion()), On 2014/02/13 23:27:54, msw wrote: > nit: I ...
6 years, 10 months ago (2014-02-13 23:38:00 UTC) #26
Maria
The CQ bit was checked by mariakhomenko@chromium.org
6 years, 10 months ago (2014-02-13 23:52:37 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mariakhomenko@chromium.org/158053002/860001
6 years, 10 months ago (2014-02-13 23:55:24 UTC) #28
commit-bot: I haz the power
6 years, 10 months ago (2014-02-14 02:48:20 UTC) #29
Message was sent while issue was closed.
Change committed as 251236

Powered by Google App Engine
This is Rietveld 408576698