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

Issue 2774663002: [Remote suggestions] Refactor the scheduler (Closed)

Created:
3 years, 9 months ago by jkrcal
Modified:
3 years, 8 months ago
CC:
chromium-reviews, ios-reviews+chrome_chromium.org, ios-reviews_chromium.org, ntp-dev+reviews_chromium.org, pkl (ping after 24h if needed), noyau+watch_chromium.org, marq+watch_chromium.org, sdefresne+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Remote suggestions] Refactor the scheduler This CL cleans up the relation of the scheduler and the provider of remote suggestions. The previous wrapper pattern was not useful as there was too much two-way communication between these two. BUG=695447 Review-Url: https://codereview.chromium.org/2774663002 Cr-Commit-Position: refs/heads/master@{#460414} Committed: https://chromium.googlesource.com/chromium/src/+/f996646c9b3b4c8027e693c5a48c7fab3adbfe8c

Patch Set 1 #

Patch Set 2 : Add missing files & make it compile #

Total comments: 14

Patch Set 3 : Comments + unit-tests #

Patch Set 4 : Deps fix #

Patch Set 5 : Fix iOS compile #

Total comments: 38

Patch Set 6 : Marc's comments #2 #

Total comments: 5

Patch Set 7 : Tim's comment #

Patch Set 8 : Marc's nits #

Total comments: 1

Patch Set 9 : Marc's nits #2 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+485 lines, -2389 lines) Patch
M chrome/browser/ntp_snippets/content_suggestions_service_factory.cc View 1 2 3 4 5 6 chunks +31 lines, -25 lines 0 comments Download
M chrome/browser/prefs/browser_prefs.cc View 1 2 2 chunks +2 lines, -3 lines 0 comments Download
M components/ntp_snippets/BUILD.gn View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M components/ntp_snippets/content_suggestions_service.h View 1 2 3 4 5 6 7 5 chunks +25 lines, -20 lines 0 comments Download
M components/ntp_snippets/content_suggestions_service.cc View 1 2 1 chunk +5 lines, -3 lines 0 comments Download
M components/ntp_snippets/content_suggestions_service_unittest.cc View 1 2 6 7 2 chunks +8 lines, -1 line 0 comments Download
M components/ntp_snippets/remote/remote_suggestions_provider_impl.h View 1 2 4 chunks +4 lines, -8 lines 0 comments Download
M components/ntp_snippets/remote/remote_suggestions_provider_impl.cc View 1 2 3 4 5 6 9 chunks +30 lines, -22 lines 0 comments Download
M components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc View 1 2 3 4 5 6 7 8 7 chunks +48 lines, -55 lines 0 comments Download
M components/ntp_snippets/remote/remote_suggestions_scheduler.h View 1 2 3 4 5 6 7 2 chunks +21 lines, -3 lines 0 comments Download
A + components/ntp_snippets/remote/remote_suggestions_scheduler_impl.h View 1 2 3 4 5 6 7 7 chunks +24 lines, -80 lines 0 comments Download
A + components/ntp_snippets/remote/remote_suggestions_scheduler_impl.cc View 1 2 3 4 5 6 7 24 chunks +82 lines, -172 lines 0 comments Download
A + components/ntp_snippets/remote/remote_suggestions_scheduler_impl_unittest.cc View 1 2 3 4 5 6 7 22 chunks +178 lines, -236 lines 0 comments Download
D components/ntp_snippets/remote/scheduling_remote_suggestions_provider.h View 1 2 1 chunk +0 lines, -218 lines 0 comments Download
D components/ntp_snippets/remote/scheduling_remote_suggestions_provider.cc View 1 chunk +0 lines, -674 lines 0 comments Download
D components/ntp_snippets/remote/scheduling_remote_suggestions_provider_unittest.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -846 lines 0 comments Download
M ios/chrome/browser/ntp_snippets/ios_chrome_content_suggestions_service_factory.cc View 1 2 3 4 5 6 chunks +22 lines, -17 lines 0 comments Download
M ios/chrome/browser/prefs/browser_prefs.mm View 2 chunks +2 lines, -3 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 42 (23 generated)
jkrcal
Tim, Marc, this is the first version of the main refactoring change. I would like ...
3 years, 9 months ago (2017-03-23 15:40:12 UTC) #2
Marc Treib
Overall direction looks good to me; some comments on the details. https://codereview.chromium.org/2774663002/diff/20001/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc File chrome/browser/ntp_snippets/content_suggestions_service_factory.cc (right): ...
3 years, 9 months ago (2017-03-23 16:41:15 UTC) #3
tschumann
overall looks good. some details. https://codereview.chromium.org/2774663002/diff/20001/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc File chrome/browser/ntp_snippets/content_suggestions_service_factory.cc (right): https://codereview.chromium.org/2774663002/diff/20001/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc#newcode231 chrome/browser/ntp_snippets/content_suggestions_service_factory.cc:231: service->set_remote_suggestions_scheduler(std::move(scheduler)); On 2017/03/23 16:41:15, ...
3 years, 9 months ago (2017-03-23 17:38:27 UTC) #4
jkrcal
Marc, could you PTAL again? https://codereview.chromium.org/2774663002/diff/20001/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc File chrome/browser/ntp_snippets/content_suggestions_service_factory.cc (right): https://codereview.chromium.org/2774663002/diff/20001/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc#newcode231 chrome/browser/ntp_snippets/content_suggestions_service_factory.cc:231: service->set_remote_suggestions_scheduler(std::move(scheduler)); On 2017/03/23 17:38:27, ...
3 years, 9 months ago (2017-03-27 10:03:03 UTC) #11
Marc Treib
https://codereview.chromium.org/2774663002/diff/20001/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc File components/ntp_snippets/remote/remote_suggestions_provider_impl.cc (right): https://codereview.chromium.org/2774663002/diff/20001/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc#newcode656 components/ntp_snippets/remote/remote_suggestions_provider_impl.cc:656: if (remote_suggestions_scheduler_) { On 2017/03/27 10:03:02, jkrcal wrote: > ...
3 years, 9 months ago (2017-03-27 11:31:01 UTC) #14
jkrcal
Thanks for the detailed review! PTAL, again. https://codereview.chromium.org/2774663002/diff/20001/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc File components/ntp_snippets/remote/remote_suggestions_provider_impl.cc (right): https://codereview.chromium.org/2774663002/diff/20001/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc#newcode656 components/ntp_snippets/remote/remote_suggestions_provider_impl.cc:656: if (remote_suggestions_scheduler_) ...
3 years, 9 months ago (2017-03-27 14:09:32 UTC) #17
Marc Treib
lgtm Thanks! LGTM with some optional nits/suggestions. https://codereview.chromium.org/2774663002/diff/20001/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc File components/ntp_snippets/remote/remote_suggestions_provider_impl.cc (right): https://codereview.chromium.org/2774663002/diff/20001/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc#newcode656 components/ntp_snippets/remote/remote_suggestions_provider_impl.cc:656: if (remote_suggestions_scheduler_) ...
3 years, 9 months ago (2017-03-27 14:27:21 UTC) #18
jkrcal
Thanks, Marc! Will address your nits in a final patch list. Bernhard, could you PTAL ...
3 years, 9 months ago (2017-03-27 15:35:29 UTC) #20
tschumann
https://codereview.chromium.org/2774663002/diff/20001/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc File components/ntp_snippets/remote/remote_suggestions_provider_impl.cc (right): https://codereview.chromium.org/2774663002/diff/20001/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc#newcode656 components/ntp_snippets/remote/remote_suggestions_provider_impl.cc:656: if (remote_suggestions_scheduler_) { On 2017/03/27 14:27:20, Marc Treib wrote: ...
3 years, 9 months ago (2017-03-27 15:40:45 UTC) #21
jkrcal
Thanks Tim. Aren't you on vacation? ;) If I do not hear anything from you, ...
3 years, 9 months ago (2017-03-27 16:02:22 UTC) #22
noyau (Ping after 24h)
ios lgtm
3 years, 8 months ago (2017-03-28 15:15:35 UTC) #26
Bernhard Bauer
prefs/ LGTM
3 years, 8 months ago (2017-03-28 15:22:42 UTC) #27
jkrcal
Marc, do you want to take a look before I submit it? - remote_suggestions_provider_impl.cc in ...
3 years, 8 months ago (2017-03-29 10:55:58 UTC) #30
Marc Treib
Thanks! Still lgtm with one more comment in the test. https://codereview.chromium.org/2774663002/diff/140001/components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc File components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc (right): https://codereview.chromium.org/2774663002/diff/140001/components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc#newcode499 ...
3 years, 8 months ago (2017-03-29 11:11:57 UTC) #31
tschumann
lgtm thank you!
3 years, 8 months ago (2017-03-29 12:22:58 UTC) #32
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/2774663002/160001
3 years, 8 months ago (2017-03-29 12:58:43 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/338327)
3 years, 8 months ago (2017-03-29 15:21:06 UTC) #37
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/2774663002/160001
3 years, 8 months ago (2017-03-29 15:24:45 UTC) #39
commit-bot: I haz the power
3 years, 8 months ago (2017-03-29 16:26:18 UTC) #42
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://chromium.googlesource.com/chromium/src/+/f996646c9b3b4c8027e693c5a48c...

Powered by Google App Engine
This is Rietveld 408576698