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

Issue 2221323003: Add an API to Pause and Resume background offlining requests. (Closed)

Created:
4 years, 4 months ago by Pete Williamson
Modified:
4 years, 4 months ago
Reviewers:
Dmitry Titov, 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
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add an API to Pause and Resume background offlining requests. The new API, PauseRequestsbyClientId and ResumeRequestsByClientId is defined and implemented. Tests are included. It is basically parallel to the existing RemoveRequestByClientId, and you can compare them when reviewing to speed up the review process. It is implemented all the way down into the request queue, including both the in-memory queue and the SQL queue. BUG=610521 Committed: https://crrev.com/48d69bf7b3937d03580c90e06767e0f909dab6be Cr-Commit-Position: refs/heads/master@{#411726}

Patch Set 1 #

Patch Set 2 : Put back the "RemoveRequest" family of functions (as opposed to RemoveRequestById) #

Patch Set 3 : Switch to request ID as key #

Total comments: 6

Patch Set 4 : Adding a check function to reduce common code. #

Total comments: 4

Patch Set 5 : CR feedback per Dimich #

Total comments: 24

Patch Set 6 : CR fixes per FGorski #

Total comments: 2

Patch Set 7 : More FGorski CR feedback #

Total comments: 2

Patch Set 8 : Comment fix #

Patch Set 9 : Merges in the RequestId patch #

Patch Set 10 : Fix unit test break introduced by merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+292 lines, -30 lines) Patch
M components/offline_pages/background/request_coordinator.h View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -1 line 0 comments Download
M components/offline_pages/background/request_coordinator.cc View 1 2 3 4 5 6 7 8 1 chunk +17 lines, -0 lines 0 comments Download
M components/offline_pages/background/request_picker.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M components/offline_pages/background/request_queue.h View 1 2 3 4 5 6 7 8 2 chunks +10 lines, -1 line 0 comments Download
M components/offline_pages/background/request_queue.cc View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -0 lines 0 comments Download
M components/offline_pages/background/request_queue_in_memory_store.h View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -2 lines 0 comments Download
M components/offline_pages/background/request_queue_in_memory_store.cc View 1 2 3 4 5 6 7 8 1 chunk +21 lines, -0 lines 0 comments Download
M components/offline_pages/background/request_queue_store.h View 1 2 3 4 5 6 7 8 3 chunks +11 lines, -2 lines 0 comments Download
M components/offline_pages/background/request_queue_store_sql.h View 1 2 3 4 5 6 7 8 2 chunks +12 lines, -0 lines 0 comments Download
M components/offline_pages/background/request_queue_store_sql.cc View 1 2 3 4 5 6 7 8 7 chunks +75 lines, -24 lines 0 comments Download
M components/offline_pages/background/request_queue_store_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +63 lines, -0 lines 0 comments Download
M components/offline_pages/background/request_queue_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +55 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 35 (13 generated)
Pete Williamson
I'm working on the change from ClientId to RequestId in another patch, which will also ...
4 years, 4 months ago (2016-08-09 16:37:32 UTC) #2
Pete Williamson
Hold off a bit if you haven't started reviewing this yet, I'm putting back all ...
4 years, 4 months ago (2016-08-09 17:50:59 UTC) #5
Pete Williamson
OK to review now.
4 years, 4 months ago (2016-08-09 17:58:11 UTC) #6
Pete Williamson
Hold off a bit longer, I'll update functions to use request_ids instead of client_ids since ...
4 years, 4 months ago (2016-08-09 18:17:43 UTC) #7
Pete Williamson
OK to review now, changed to use RequestId as key instead of ClientId.
4 years, 4 months ago (2016-08-09 19:54:28 UTC) #8
Dmitry Titov
https://codereview.chromium.org/2221323003/diff/40001/components/offline_pages/background/request_queue_in_memory_store.cc File components/offline_pages/background/request_queue_in_memory_store.cc (right): https://codereview.chromium.org/2221323003/diff/40001/components/offline_pages/background/request_queue_in_memory_store.cc#newcode104 components/offline_pages/background/request_queue_in_memory_store.cc:104: for (auto iter = requests_.begin(); iter != requests_.end(); ++iter) ...
4 years, 4 months ago (2016-08-09 21:01:43 UTC) #11
Pete Williamson
https://codereview.chromium.org/2221323003/diff/40001/components/offline_pages/background/request_queue_store_sql.cc File components/offline_pages/background/request_queue_store_sql.cc (right): https://codereview.chromium.org/2221323003/diff/40001/components/offline_pages/background/request_queue_store_sql.cc#newcode462 components/offline_pages/background/request_queue_store_sql.cc:462: if (!db_.get()) { On 2016/08/09 21:01:43, Dmitry Titov wrote: ...
4 years, 4 months ago (2016-08-09 22:53:24 UTC) #14
Dmitry Titov
I think you've missed this one: https://codereview.chromium.org/2221323003/diff/40001/components/offline_page... components/offline_pages/background/request_queue_in_memory_store.cc:104: for (auto iter = requests_.begin(); iter != ...
4 years, 4 months ago (2016-08-09 23:46:33 UTC) #15
Pete Williamson
https://codereview.chromium.org/2221323003/diff/40001/components/offline_pages/background/request_queue_in_memory_store.cc File components/offline_pages/background/request_queue_in_memory_store.cc (right): https://codereview.chromium.org/2221323003/diff/40001/components/offline_pages/background/request_queue_in_memory_store.cc#newcode104 components/offline_pages/background/request_queue_in_memory_store.cc:104: for (auto iter = requests_.begin(); iter != requests_.end(); ++iter) ...
4 years, 4 months ago (2016-08-10 01:34:10 UTC) #16
fgorski
https://codereview.chromium.org/2221323003/diff/80001/components/offline_pages/background/request_queue.h File components/offline_pages/background/request_queue.h (right): https://codereview.chromium.org/2221323003/diff/80001/components/offline_pages/background/request_queue.h#newcode23 components/offline_pages/background/request_queue.h:23: class SavePageRequest; please remove now that you are adding ...
4 years, 4 months ago (2016-08-10 16:00:10 UTC) #17
Pete Williamson
https://codereview.chromium.org/2221323003/diff/80001/components/offline_pages/background/request_queue.h File components/offline_pages/background/request_queue.h (right): https://codereview.chromium.org/2221323003/diff/80001/components/offline_pages/background/request_queue.h#newcode23 components/offline_pages/background/request_queue.h:23: class SavePageRequest; On 2016/08/10 16:00:09, fgorski wrote: > please ...
4 years, 4 months ago (2016-08-10 21:38:01 UTC) #18
fgorski
lgtm mod a nit and discussion we need to have in the office. https://codereview.chromium.org/2221323003/diff/80001/components/offline_pages/background/request_queue_store_sql.cc File ...
4 years, 4 months ago (2016-08-10 21:49:17 UTC) #19
Pete Williamson
This should address all FGorski issues, still waiting to see if Dimich has more feedback. ...
4 years, 4 months ago (2016-08-10 23:34:41 UTC) #20
Dmitry Titov
lgtm with a nit and understanding that no new code should be written before TODOs ...
4 years, 4 months ago (2016-08-11 04:25:30 UTC) #21
Dmitry Titov
Oh, forgot to actually publish a nit: https://codereview.chromium.org/2221323003/diff/120001/components/offline_pages/background/request_queue_store.h File components/offline_pages/background/request_queue_store.h (right): https://codereview.chromium.org/2221323003/diff/120001/components/offline_pages/background/request_queue_store.h#newcode25 components/offline_pages/background/request_queue_store.h:25: // TODO(fgorski): ...
4 years, 4 months ago (2016-08-11 04:25:54 UTC) #22
Pete Williamson
https://codereview.chromium.org/2221323003/diff/120001/components/offline_pages/background/request_queue_store.h File components/offline_pages/background/request_queue_store.h (right): https://codereview.chromium.org/2221323003/diff/120001/components/offline_pages/background/request_queue_store.h#newcode25 components/offline_pages/background/request_queue_store.h:25: // TODO(fgorski): What if no items were updated? Maybe ...
4 years, 4 months ago (2016-08-12 00:06:46 UTC) #23
Pete Williamson
Just some merge fixes with the other large patch that I submitted to change from ...
4 years, 4 months ago (2016-08-12 17:49:28 UTC) #24
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/2221323003/160001
4 years, 4 months ago (2016-08-12 17:50:04 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/51375)
4 years, 4 months ago (2016-08-12 18:04:02 UTC) #29
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/2221323003/180001
4 years, 4 months ago (2016-08-12 18:34:26 UTC) #32
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 4 months ago (2016-08-12 19:17:40 UTC) #33
commit-bot: I haz the power
4 years, 4 months ago (2016-08-12 19:19:18 UTC) #35
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/48d69bf7b3937d03580c90e06767e0f909dab6be
Cr-Commit-Position: refs/heads/master@{#411726}

Powered by Google App Engine
This is Rietveld 408576698