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 2543093002: Split the RequestPicker task into two separate tasks. (Closed)

Created:
4 years ago by Pete Williamson
Modified:
4 years ago
Reviewers:
dougarnett, fgorski
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
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Split the RequestPicker task into two separate tasks. We still have a picker task, but now we also have a cleanup task. The cleanup task will remove expired entries, and entries that exceed their start or completion limit. It does not yet flip offlining tasks to available on startup, I plan that for a separate changelist, and likely a new task. BUG=670343 Committed: https://crrev.com/55fc16c382cd559fca177abd0ae291213bd5893b Cr-Commit-Position: refs/heads/master@{#436671}

Patch Set 1 #

Total comments: 57

Patch Set 2 : CR feedback per FGorski and DougArnett #

Total comments: 6

Patch Set 3 : Second round of CR feedback #

Total comments: 3

Patch Set 4 : ADD TODO #

Unified diffs Side-by-side diffs Delta from patch set Stats (+703 lines, -300 lines) Patch
M components/offline_pages/background/BUILD.gn View 1 3 chunks +7 lines, -2 lines 0 comments Download
A components/offline_pages/background/cleanup_task.h View 1 2 1 chunk +61 lines, -0 lines 0 comments Download
A components/offline_pages/background/cleanup_task.cc View 1 2 3 1 chunk +109 lines, -0 lines 0 comments Download
A components/offline_pages/background/cleanup_task_factory.h View 1 2 1 chunk +42 lines, -0 lines 0 comments Download
A + components/offline_pages/background/cleanup_task_factory.cc View 1 2 2 chunks +12 lines, -15 lines 0 comments Download
A components/offline_pages/background/cleanup_task_unittest.cc View 1 2 1 chunk +279 lines, -0 lines 0 comments Download
A components/offline_pages/background/offliner_policy_utils.h View 1 2 1 chunk +29 lines, -0 lines 0 comments Download
A components/offline_pages/background/offliner_policy_utils.cc View 1 2 1 chunk +34 lines, -0 lines 0 comments Download
M components/offline_pages/background/pick_request_task.h View 1 4 chunks +9 lines, -27 lines 0 comments Download
M components/offline_pages/background/pick_request_task.cc View 1 7 chunks +35 lines, -94 lines 0 comments Download
D components/offline_pages/background/pick_request_task_factory.h View 1 chunk +0 lines, -48 lines 0 comments Download
D components/offline_pages/background/pick_request_task_factory.cc View 1 chunk +0 lines, -38 lines 0 comments Download
M components/offline_pages/background/pick_request_task_unittest.cc View 1 18 chunks +35 lines, -35 lines 0 comments Download
M components/offline_pages/background/request_coordinator.h View 1 1 chunk +3 lines, -2 lines 0 comments Download
M components/offline_pages/background/request_coordinator.cc View 1 2 5 chunks +19 lines, -7 lines 0 comments Download
M components/offline_pages/background/request_coordinator_unittest.cc View 1 3 chunks +1 line, -8 lines 0 comments Download
M components/offline_pages/background/request_queue.h View 1 2 4 chunks +13 lines, -8 lines 0 comments Download
M components/offline_pages/background/request_queue.cc View 2 3 chunks +11 lines, -3 lines 0 comments Download
M components/offline_pages/background/request_queue_unittest.cc View 1 2 2 chunks +4 lines, -13 lines 0 comments Download

Messages

Total messages: 20 (5 generated)
Pete Williamson
4 years ago (2016-12-02 01:21:13 UTC) #2
dougarnett
https://codereview.chromium.org/2543093002/diff/1/components/offline_pages/background/cleanup_task.cc File components/offline_pages/background/cleanup_task.cc (right): https://codereview.chromium.org/2543093002/diff/1/components/offline_pages/background/cleanup_task.cc#newcode29 components/offline_pages/background/cleanup_task.cc:29: void CleanupTask::GetExpiredRequestIds( should this be positioned later in file ...
4 years ago (2016-12-02 17:20:27 UTC) #3
fgorski
https://codereview.chromium.org/2543093002/diff/1/components/offline_pages/background/cleanup_task.cc File components/offline_pages/background/cleanup_task.cc (right): https://codereview.chromium.org/2543093002/diff/1/components/offline_pages/background/cleanup_task.cc#newcode29 components/offline_pages/background/cleanup_task.cc:29: void CleanupTask::GetExpiredRequestIds( On 2016/12/02 17:20:26, dougarnett wrote: > should ...
4 years ago (2016-12-02 21:44:05 UTC) #4
dougarnett
https://codereview.chromium.org/2543093002/diff/1/components/offline_pages/background/pick_request_task.cc File components/offline_pages/background/pick_request_task.cc (right): https://codereview.chromium.org/2543093002/diff/1/components/offline_pages/background/pick_request_task.cc#newcode120 components/offline_pages/background/pick_request_task.cc:120: // the count of valid entries, but now we ...
4 years ago (2016-12-02 23:00:11 UTC) #5
Pete Williamson
https://codereview.chromium.org/2543093002/diff/1/components/offline_pages/background/cleanup_task.cc File components/offline_pages/background/cleanup_task.cc (right): https://codereview.chromium.org/2543093002/diff/1/components/offline_pages/background/cleanup_task.cc#newcode29 components/offline_pages/background/cleanup_task.cc:29: void CleanupTask::GetExpiredRequestIds( On 2016/12/02 17:20:26, dougarnett wrote: > should ...
4 years ago (2016-12-05 20:39:46 UTC) #6
fgorski
almost there. I don't think we should be relying on current_request_id for clean up task. ...
4 years ago (2016-12-05 21:05:37 UTC) #7
dougarnett
looking good - couple comments https://codereview.chromium.org/2543093002/diff/1/components/offline_pages/background/cleanup_task.cc File components/offline_pages/background/cleanup_task.cc (right): https://codereview.chromium.org/2543093002/diff/1/components/offline_pages/background/cleanup_task.cc#newcode86 components/offline_pages/background/cleanup_task.cc:86: RequestNotifier::BackgroundSavePageResult::EXPIRED); On 2016/12/05 20:39:45, ...
4 years ago (2016-12-05 21:27:45 UTC) #8
Pete Williamson
https://codereview.chromium.org/2543093002/diff/1/components/offline_pages/background/cleanup_task.cc File components/offline_pages/background/cleanup_task.cc (right): https://codereview.chromium.org/2543093002/diff/1/components/offline_pages/background/cleanup_task.cc#newcode86 components/offline_pages/background/cleanup_task.cc:86: RequestNotifier::BackgroundSavePageResult::EXPIRED); On 2016/12/05 21:27:45, dougarnett wrote: > On 2016/12/05 ...
4 years ago (2016-12-06 00:25:38 UTC) #9
dougarnett
https://codereview.chromium.org/2543093002/diff/40001/components/offline_pages/background/cleanup_task.cc File components/offline_pages/background/cleanup_task.cc (right): https://codereview.chromium.org/2543093002/diff/40001/components/offline_pages/background/cleanup_task.cc#newcode95 components/offline_pages/background/cleanup_task.cc:95: request->request_state() != SavePageRequest::RequestState::OFFLINING) { This check relies on the ...
4 years ago (2016-12-06 00:59:41 UTC) #10
Pete Williamson
https://codereview.chromium.org/2543093002/diff/40001/components/offline_pages/background/cleanup_task.cc File components/offline_pages/background/cleanup_task.cc (right): https://codereview.chromium.org/2543093002/diff/40001/components/offline_pages/background/cleanup_task.cc#newcode95 components/offline_pages/background/cleanup_task.cc:95: request->request_state() != SavePageRequest::RequestState::OFFLINING) { On 2016/12/06 00:59:41, dougarnett wrote: ...
4 years ago (2016-12-06 02:06:28 UTC) #11
dougarnett
lgtm with comment https://codereview.chromium.org/2543093002/diff/40001/components/offline_pages/background/cleanup_task.cc File components/offline_pages/background/cleanup_task.cc (right): https://codereview.chromium.org/2543093002/diff/40001/components/offline_pages/background/cleanup_task.cc#newcode95 components/offline_pages/background/cleanup_task.cc:95: request->request_state() != SavePageRequest::RequestState::OFFLINING) { On 2016/12/06 ...
4 years ago (2016-12-06 02:11:13 UTC) #12
fgorski
lgtm. This is great work. Thanks for addressing all my comments! Filip
4 years ago (2016-12-06 17:05:35 UTC) #13
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/2543093002/60001
4 years ago (2016-12-06 18:00:22 UTC) #16
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years ago (2016-12-06 19:04:33 UTC) #18
commit-bot: I haz the power
4 years ago (2016-12-06 19:07:13 UTC) #20
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/55fc16c382cd559fca177abd0ae291213bd5893b
Cr-Commit-Position: refs/heads/master@{#436671}

Powered by Google App Engine
This is Rietveld 408576698