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

Issue 2568133005: [SuggestionsService] Split SuggestionsService interface from impl (Closed)

Created:
4 years ago by mastiz
Modified:
4 years ago
CC:
chromium-reviews, skanuj+watch_chromium.org, melevin+watch_chromium.org, ntp-dev+reviews_chromium.org, donnd+watch_chromium.org, jfweitz+watch_chromium.org, David Black, samarth+watch_chromium.org, kmadhusu+watch_chromium.org, Jered
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[SuggestionsService] Split SuggestionsService interface from impl The introduction of an interface allows dependent classes (primarily MostVisitedSites) to inject doubles in tests, since it's otherwise hard due to the number of dependencies. A small signature change is adopted: GetSuggestionsDataFromCache() now returns base::Optional, which allows clients to distinguish cache misses from cache containing an empty tileset. Client code has been updated to prevent behavioral changes. BUG=619584 Committed: https://crrev.com/d5d7b4a47a878e25b55294cf09751340aaf302e2 Cr-Commit-Position: refs/heads/master@{#439195}

Patch Set 1 #

Patch Set 2 : Split SuggestionsService interface and SuggestionsServiceImpl. #

Patch Set 3 : Fix iOS build. #

Patch Set 4 #

Total comments: 3

Patch Set 5 : Moved impl to dedicated file. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+159 lines, -1644 lines) Patch
M chrome/browser/search/suggestions/suggestions_service_factory.cc View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/search/suggestions/suggestions_ui.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider.cc View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M components/ntp_tiles/most_visited_sites.cc View 1 chunk +2 lines, -1 line 0 comments Download
M components/suggestions/BUILD.gn View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M components/suggestions/suggestions_service.h View 1 2 3 4 2 chunks +15 lines, -175 lines 0 comments Download
M components/suggestions/suggestions_service.cc View 1 2 3 4 1 chunk +0 lines, -558 lines 0 comments Download
A + components/suggestions/suggestions_service_impl.h View 1 2 3 4 6 chunks +33 lines, -62 lines 0 comments Download
A + components/suggestions/suggestions_service_impl.cc View 1 2 3 4 19 chunks +60 lines, -54 lines 0 comments Download
A + components/suggestions/suggestions_service_impl_unittest.cc View 1 2 3 4 24 chunks +35 lines, -37 lines 0 comments Download
M components/suggestions/suggestions_service_unittest.cc View 1 2 3 4 1 chunk +0 lines, -746 lines 0 comments Download
M ios/chrome/browser/suggestions/suggestions_service_factory.mm View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 45 (31 generated)
mastiz
4 years ago (2016-12-13 14:44:16 UTC) #22
mastiz
4 years ago (2016-12-13 14:51:20 UTC) #24
Marc Treib
lgtm https://codereview.chromium.org/2568133005/diff/60001/components/suggestions/suggestions_service.h File components/suggestions/suggestions_service.h (right): https://codereview.chromium.org/2568133005/diff/60001/components/suggestions/suggestions_service.h#newcode100 components/suggestions/suggestions_service.h:100: class SuggestionsServiceImpl : public SuggestionsService, Hm, I think ...
4 years ago (2016-12-13 15:12:07 UTC) #25
mastiz
https://codereview.chromium.org/2568133005/diff/60001/components/suggestions/suggestions_service.h File components/suggestions/suggestions_service.h (right): https://codereview.chromium.org/2568133005/diff/60001/components/suggestions/suggestions_service.h#newcode100 components/suggestions/suggestions_service.h:100: class SuggestionsServiceImpl : public SuggestionsService, On 2016/12/13 15:12:07, Marc ...
4 years ago (2016-12-13 16:18:50 UTC) #28
Marc Treib
https://codereview.chromium.org/2568133005/diff/60001/components/suggestions/suggestions_service.h File components/suggestions/suggestions_service.h (right): https://codereview.chromium.org/2568133005/diff/60001/components/suggestions/suggestions_service.h#newcode100 components/suggestions/suggestions_service.h:100: class SuggestionsServiceImpl : public SuggestionsService, On 2016/12/13 16:18:49, mastiz ...
4 years ago (2016-12-13 16:30:27 UTC) #29
Marc Treib
Ah, and just for completeness' sake, still LGTM
4 years ago (2016-12-13 16:33:04 UTC) #30
mastiz
jennyz@chromium.org: Please review changes in chrome/browser/ui sdefresne@chromium.org: Please review changes in ios/
4 years ago (2016-12-14 09:00:55 UTC) #34
sdefresne
ios/ lgtm
4 years ago (2016-12-14 11:56:22 UTC) #35
mastiz
Friendly ping for jennyz@.
4 years ago (2016-12-15 08:26:26 UTC) #36
mastiz
Friendly ping for jennyz@, thanks.
4 years ago (2016-12-16 08:36:32 UTC) #37
jennyz
lgtm
4 years ago (2016-12-16 18:00:08 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2568133005/80001
4 years ago (2016-12-16 18:28:04 UTC) #40
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years ago (2016-12-16 21:42:11 UTC) #43
commit-bot: I haz the power
4 years ago (2016-12-16 21:45:12 UTC) #45
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/d5d7b4a47a878e25b55294cf09751340aaf302e2
Cr-Commit-Position: refs/heads/master@{#439195}

Powered by Google App Engine
This is Rietveld 408576698