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

Issue 2197573003: Provide API in RequestCoordinator to remove results by client ID. (Closed)

Created:
4 years, 4 months ago by Pete Williamson
Modified:
4 years, 4 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

Provide API in RequestCoordinator to remove results by client ID. Since the RequestQueue supports removing by request_id instead of by client_id, I also added a new method to the RequestQueue to remove by a list of client_ids. BUG=610521 Committed: https://crrev.com/d01a2d6450812cc7f91a867621cc22e1b1f82727 Cr-Commit-Position: refs/heads/master@{#409617}

Patch Set 1 #

Total comments: 4

Patch Set 2 : CR feedback per DougArnett #

Total comments: 19

Patch Set 3 : CR feedback #

Patch Set 4 : Comment change (TODO) #

Total comments: 33

Patch Set 5 : Enhance unit tests and code per CR feedback per FGorski. #

Total comments: 4

Patch Set 6 : Comment changes per feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+287 lines, -3 lines) Patch
M components/offline_pages/background/request_coordinator.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M components/offline_pages/background/request_coordinator.cc View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M components/offline_pages/background/request_queue.h View 1 2 2 chunks +6 lines, -0 lines 0 comments Download
M components/offline_pages/background/request_queue.cc View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M components/offline_pages/background/request_queue_in_memory_store.h View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M components/offline_pages/background/request_queue_in_memory_store.cc View 1 2 3 4 5 3 chunks +21 lines, -2 lines 0 comments Download
M components/offline_pages/background/request_queue_store.h View 1 2 2 chunks +10 lines, -0 lines 0 comments Download
M components/offline_pages/background/request_queue_store_sql.h View 2 chunks +7 lines, -0 lines 0 comments Download
M components/offline_pages/background/request_queue_store_sql.cc View 1 2 3 4 7 chunks +76 lines, -0 lines 0 comments Download
M components/offline_pages/background/request_queue_store_unittest.cc View 1 2 3 4 3 chunks +96 lines, -1 line 0 comments Download
M components/offline_pages/background/request_queue_unittest.cc View 1 2 3 4 1 chunk +37 lines, -0 lines 0 comments Download
M components/offline_pages/offline_page_item.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M components/offline_pages/offline_page_item.cc View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (5 generated)
Pete Williamson
(DewittJ is optional)
4 years, 4 months ago (2016-07-29 17:49:01 UTC) #2
dougarnett
https://codereview.chromium.org/2197573003/diff/1/components/offline_pages/background/request_coordinator.h File components/offline_pages/background/request_coordinator.h (right): https://codereview.chromium.org/2197573003/diff/1/components/offline_pages/background/request_coordinator.h#newcode54 components/offline_pages/background/request_coordinator.h:54: // request queue, but does not cancel an in-progress ...
4 years, 4 months ago (2016-07-29 19:01:24 UTC) #3
Pete Williamson
https://codereview.chromium.org/2197573003/diff/1/components/offline_pages/background/request_coordinator.h File components/offline_pages/background/request_coordinator.h (right): https://codereview.chromium.org/2197573003/diff/1/components/offline_pages/background/request_coordinator.h#newcode54 components/offline_pages/background/request_coordinator.h:54: // request queue, but does not cancel an in-progress ...
4 years, 4 months ago (2016-07-29 22:48:52 UTC) #4
dougarnett
just nits https://codereview.chromium.org/2197573003/diff/20001/components/offline_pages/background/request_coordinator.cc File components/offline_pages/background/request_coordinator.cc (right): https://codereview.chromium.org/2197573003/diff/20001/components/offline_pages/background/request_coordinator.cc#newcode73 components/offline_pages/background/request_coordinator.cc:73: // If the client does not need ...
4 years, 4 months ago (2016-08-01 18:28:35 UTC) #5
chili
https://codereview.chromium.org/2197573003/diff/20001/components/offline_pages/background/request_queue_in_memory_store.h File components/offline_pages/background/request_queue_in_memory_store.h (right): https://codereview.chromium.org/2197573003/diff/20001/components/offline_pages/background/request_queue_in_memory_store.h#newcode29 components/offline_pages/background/request_queue_in_memory_store.h:29: void RemoveRequests(const std::vector<int64_t>& request_ids, just out of curiosity - ...
4 years, 4 months ago (2016-08-01 19:34:40 UTC) #6
Dmitry Titov
https://codereview.chromium.org/2197573003/diff/20001/components/offline_pages/background/request_coordinator.h File components/offline_pages/background/request_coordinator.h (right): https://codereview.chromium.org/2197573003/diff/20001/components/offline_pages/background/request_coordinator.h#newcode56 components/offline_pages/background/request_coordinator.h:56: void RemoveRequests(const std::vector<ClientId>& client_ids); Can we add a callback? ...
4 years, 4 months ago (2016-08-01 19:37:32 UTC) #8
Pete Williamson
CR feedback for DougArnett, Chili, and Dimich https://codereview.chromium.org/2197573003/diff/20001/components/offline_pages/background/request_coordinator.cc File components/offline_pages/background/request_coordinator.cc (right): https://codereview.chromium.org/2197573003/diff/20001/components/offline_pages/background/request_coordinator.cc#newcode73 components/offline_pages/background/request_coordinator.cc:73: // If ...
4 years, 4 months ago (2016-08-01 23:23:08 UTC) #9
Pete Williamson
Oops, this time with the changed code.
4 years, 4 months ago (2016-08-01 23:23:38 UTC) #10
Dmitry Titov
lgtm
4 years, 4 months ago (2016-08-01 23:38:19 UTC) #11
dougarnett
lgtm with one remaining nit to consider https://codereview.chromium.org/2197573003/diff/20001/components/offline_pages/background/request_queue_store_sql.cc File components/offline_pages/background/request_queue_store_sql.cc (right): https://codereview.chromium.org/2197573003/diff/20001/components/offline_pages/background/request_queue_store_sql.cc#newcode270 components/offline_pages/background/request_queue_store_sql.cc:270: if (DeleteRequestsByClientIds(db, ...
4 years, 4 months ago (2016-08-02 00:12:39 UTC) #12
Pete Williamson
https://codereview.chromium.org/2197573003/diff/20001/components/offline_pages/background/request_queue_store_sql.cc File components/offline_pages/background/request_queue_store_sql.cc (right): https://codereview.chromium.org/2197573003/diff/20001/components/offline_pages/background/request_queue_store_sql.cc#newcode270 components/offline_pages/background/request_queue_store_sql.cc:270: if (DeleteRequestsByClientIds(db, client_ids, &count)) On 2016/08/02 00:12:39, dougarnett wrote: ...
4 years, 4 months ago (2016-08-02 00:35:08 UTC) #13
fgorski
https://codereview.chromium.org/2197573003/diff/60001/components/offline_pages/background/request_coordinator.cc File components/offline_pages/background/request_coordinator.cc (right): https://codereview.chromium.org/2197573003/diff/60001/components/offline_pages/background/request_coordinator.cc#newcode75 components/offline_pages/background/request_coordinator.cc:75: nit: remove empty line. https://codereview.chromium.org/2197573003/diff/60001/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/2197573003/diff/60001/components/offline_pages/background/request_queue_in_memory_store.cc#newcode61 ...
4 years, 4 months ago (2016-08-02 05:01:23 UTC) #14
Pete Williamson
https://codereview.chromium.org/2197573003/diff/60001/components/offline_pages/background/request_coordinator.cc File components/offline_pages/background/request_coordinator.cc (right): https://codereview.chromium.org/2197573003/diff/60001/components/offline_pages/background/request_coordinator.cc#newcode75 components/offline_pages/background/request_coordinator.cc:75: On 2016/08/02 05:01:22, fgorski wrote: > nit: remove empty ...
4 years, 4 months ago (2016-08-02 23:27:17 UTC) #15
fgorski
lgtm with nits. Alternative to set is unordered_set. I wonder if we should add a ...
4 years, 4 months ago (2016-08-03 03:29:41 UTC) #16
Pete Williamson
Post L G T M with nits replies https://codereview.chromium.org/2197573003/diff/60001/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/2197573003/diff/60001/components/offline_pages/background/request_queue_in_memory_store.cc#newcode65 components/offline_pages/background/request_queue_in_memory_store.cc:65: ++iter) ...
4 years, 4 months ago (2016-08-03 19:51:09 UTC) #17
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/2197573003/100001
4 years, 4 months ago (2016-08-03 19:52:16 UTC) #20
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 4 months ago (2016-08-03 20:53:42 UTC) #21
commit-bot: I haz the power
4 years, 4 months ago (2016-08-03 20:55:46 UTC) #23
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/d01a2d6450812cc7f91a867621cc22e1b1f82727
Cr-Commit-Position: refs/heads/master@{#409617}

Powered by Google App Engine
This is Rietveld 408576698