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

Issue 2020833002: Add the request picker and a unit test (Closed)

Created:
4 years, 6 months ago by Pete Williamson
Modified:
4 years, 6 months ago
CC:
chromium-reviews, romax+watch_chromium.org, fgorski+watch_chromium.org, dewittj+watch_chromium.org, petewil+watch_chromium.org, chili+watch_chromium.org, dimich+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add the request picker and a unit test The RequestPicker is responsible for choosing which request from the request queue to process next. It will apply policies from the policy class to the data returned by the request queue, pick a likely candidate, and call back to the request coordinator so it can start offlining the candidate. If there is no candidate, it will call back to the request coordinator to let it know processing is done for this cycle. BUG=610521 Committed: https://crrev.com/8ba587222e4138e227f9770df9d8237576342b3a Cr-Commit-Position: refs/heads/master@{#396967}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Fix comment and indentation per Chili #

Total comments: 9

Patch Set 3 : CR feedback per Dimich and DougArnett #

Unified diffs Side-by-side diffs Delta from patch set Stats (+277 lines, -18 lines) Patch
M components/components_tests.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M components/offline_pages.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M components/offline_pages/background/BUILD.gn View 2 chunks +3 lines, -0 lines 0 comments Download
M components/offline_pages/background/request_coordinator.h View 1 3 chunks +15 lines, -3 lines 0 comments Download
M components/offline_pages/background/request_coordinator.cc View 1 2 7 chunks +36 lines, -9 lines 0 comments Download
M components/offline_pages/background/request_coordinator_unittest.cc View 1 chunk +0 lines, -6 lines 0 comments Download
A components/offline_pages/background/request_picker.h View 1 2 1 chunk +43 lines, -0 lines 0 comments Download
A components/offline_pages/background/request_picker.cc View 1 2 1 chunk +47 lines, -0 lines 0 comments Download
A components/offline_pages/background/request_picker_unittest.cc View 1 2 1 chunk +130 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (8 generated)
Pete Williamson
4 years, 6 months ago (2016-05-27 23:40:03 UTC) #3
chili
A few comments - more questions than anything Looking good! https://codereview.chromium.org/2020833002/diff/1/components/offline_pages/background/request_coordinator.cc File components/offline_pages/background/request_coordinator.cc (right): https://codereview.chromium.org/2020833002/diff/1/components/offline_pages/background/request_coordinator.cc#newcode81 ...
4 years, 6 months ago (2016-05-27 23:54:13 UTC) #4
Pete Williamson
https://codereview.chromium.org/2020833002/diff/1/components/offline_pages/background/request_coordinator.cc File components/offline_pages/background/request_coordinator.cc (right): https://codereview.chromium.org/2020833002/diff/1/components/offline_pages/background/request_coordinator.cc#newcode81 components/offline_pages/background/request_coordinator.cc:81: // Send the request on to the offliner. On ...
4 years, 6 months ago (2016-05-28 00:08:52 UTC) #5
Dmitry Titov
https://codereview.chromium.org/2020833002/diff/20001/components/offline_pages/background/request_picker.h File components/offline_pages/background/request_picker.h (right): https://codereview.chromium.org/2020833002/diff/20001/components/offline_pages/background/request_picker.h#newcode14 components/offline_pages/background/request_picker.h:14: class RequestPicker { So the pattern of usage is: ...
4 years, 6 months ago (2016-05-28 00:36:57 UTC) #7
Pete Williamson
https://codereview.chromium.org/2020833002/diff/20001/components/offline_pages/background/request_picker.h File components/offline_pages/background/request_picker.h (right): https://codereview.chromium.org/2020833002/diff/20001/components/offline_pages/background/request_picker.h#newcode14 components/offline_pages/background/request_picker.h:14: class RequestPicker { On 2016/05/28 00:36:57, Dmitry Titov wrote: ...
4 years, 6 months ago (2016-05-28 00:53:47 UTC) #8
dougarnett
https://codereview.chromium.org/2020833002/diff/20001/components/offline_pages/background/request_coordinator.cc File components/offline_pages/background/request_coordinator.cc (right): https://codereview.chromium.org/2020833002/diff/20001/components/offline_pages/background/request_coordinator.cc#newcode31 components/offline_pages/background/request_coordinator.cc:31: picker_.reset(new RequestPicker( Doesn't look like we are accessing as ...
4 years, 6 months ago (2016-05-31 17:45:37 UTC) #9
dougarnett
https://codereview.chromium.org/2020833002/diff/20001/components/offline_pages/background/request_coordinator.h File components/offline_pages/background/request_coordinator.h (right): https://codereview.chromium.org/2020833002/diff/20001/components/offline_pages/background/request_coordinator.h#newcode29 components/offline_pages/background/request_coordinator.h:29: class RequestCoordinator : public KeyedService { On 2016/05/31 17:45:37, ...
4 years, 6 months ago (2016-05-31 17:47:26 UTC) #10
dougarnett
lgtm I would like to see some protection on StartProcessing being called multiple times when ...
4 years, 6 months ago (2016-05-31 18:03:04 UTC) #11
chili
lgtm
4 years, 6 months ago (2016-05-31 18:06:39 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2020833002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2020833002/40001
4 years, 6 months ago (2016-05-31 19:30:10 UTC) #14
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-05-31 22:58:44 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2020833002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2020833002/40001
4 years, 6 months ago (2016-05-31 23:07:20 UTC) #19
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 6 months ago (2016-05-31 23:13:32 UTC) #20
commit-bot: I haz the power
4 years, 6 months ago (2016-05-31 23:16:21 UTC) #22
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/8ba587222e4138e227f9770df9d8237576342b3a
Cr-Commit-Position: refs/heads/master@{#396967}

Powered by Google App Engine
This is Rietveld 408576698