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

Issue 2729763002: [Offline Pages] Pick correct request when resuming. (Closed)

Created:
3 years, 9 months ago by romax
Modified:
3 years, 9 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
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Offline Pages] Pick correct request when resuming. Fixed the bug where if user resumes a webpage download in notification, the request queue would not honor the priority of the tapped request and pick from all requests using normal logic. BUG=674653 Review-Url: https://codereview.chromium.org/2729763002 Cr-Commit-Position: refs/heads/master@{#455898} Committed: https://chromium.googlesource.com/chromium/src/+/50952e8e2031ad1f9d59b4f9bcf0682dd08e6f1b

Patch Set 1 #

Patch Set 2 : Moving logic to pick_request_task. #

Total comments: 15

Patch Set 3 : comments. #

Total comments: 10

Patch Set 4 : comments from Pete. #

Total comments: 1

Patch Set 5 : After offline discussion. #

Total comments: 1

Patch Set 6 : update comments. #

Total comments: 28

Patch Set 7 : more comments. #

Total comments: 1

Patch Set 8 : nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+169 lines, -26 lines) Patch
M components/offline_pages/core/background/pick_request_task.h View 1 2 3 4 3 chunks +4 lines, -1 line 0 comments Download
M components/offline_pages/core/background/pick_request_task.cc View 1 2 3 4 5 6 7 4 chunks +50 lines, -14 lines 0 comments Download
M components/offline_pages/core/background/pick_request_task_unittest.cc View 1 2 3 4 4 chunks +73 lines, -1 line 0 comments Download
M components/offline_pages/core/background/request_coordinator.h View 1 2 3 4 5 6 1 chunk +9 lines, -0 lines 0 comments Download
M components/offline_pages/core/background/request_coordinator.cc View 1 2 3 4 3 chunks +17 lines, -5 lines 0 comments Download
M components/offline_pages/core/background/request_coordinator_unittest.cc View 1 2 3 4 3 chunks +7 lines, -0 lines 0 comments Download
M components/offline_pages/core/background/request_queue.h View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M components/offline_pages/core/background/request_queue.cc View 1 2 3 4 1 chunk +6 lines, -4 lines 0 comments Download

Messages

Total messages: 30 (10 generated)
romax
petewil@ PTAL! Also happy to chat offline if this doesn't seem like a good way. ...
3 years, 9 months ago (2017-03-02 02:15:20 UTC) #2
fgorski
I have a feeling this could go in the picker task if possible. WDYT, Pete?
3 years, 9 months ago (2017-03-02 17:09:48 UTC) #4
Pete Williamson
On 2017/03/02 17:09:48, fgorski wrote: > I have a feeling this could go in the ...
3 years, 9 months ago (2017-03-03 21:48:41 UTC) #5
romax
Moved the logic to pick_request_task. PTAL, thanks!
3 years, 9 months ago (2017-03-04 03:21:45 UTC) #6
fgorski
On 2017/03/04 03:21:45, romax wrote: > Moved the logic to pick_request_task. PTAL, thanks! I have ...
3 years, 9 months ago (2017-03-06 18:12:22 UTC) #7
fgorski
And comments to the patch. https://codereview.chromium.org/2729763002/diff/20001/components/offline_pages/core/background/pick_request_task.cc File components/offline_pages/core/background/pick_request_task.cc (right): https://codereview.chromium.org/2729763002/diff/20001/components/offline_pages/core/background/pick_request_task.cc#newcode107 components/offline_pages/core/background/pick_request_task.cc:107: // priortized request has ...
3 years, 9 months ago (2017-03-06 18:12:45 UTC) #8
Pete Williamson
https://codereview.chromium.org/2729763002/diff/20001/components/offline_pages/core/background/pick_request_task.cc File components/offline_pages/core/background/pick_request_task.cc (right): https://codereview.chromium.org/2729763002/diff/20001/components/offline_pages/core/background/pick_request_task.cc#newcode88 components/offline_pages/core/background/pick_request_task.cc:88: bool is_priortized_request_picked = false; nit: was_prioritized_request_picked might be better ...
3 years, 9 months ago (2017-03-06 18:30:57 UTC) #9
romax
addressed comments, PTAL thanks! As for fgorski@'s comment, all the prioritized requests are in a ...
3 years, 9 months ago (2017-03-07 18:40:44 UTC) #10
Pete Williamson
https://codereview.chromium.org/2729763002/diff/40001/components/offline_pages/core/background/pick_request_task.cc File components/offline_pages/core/background/pick_request_task.cc (right): https://codereview.chromium.org/2729763002/diff/40001/components/offline_pages/core/background/pick_request_task.cc#newcode74 components/offline_pages/core/background/pick_request_task.cc:74: // pick the most deserving request for our conditions. ...
3 years, 9 months ago (2017-03-07 19:06:05 UTC) #11
romax
Addressed more comments from Pete. PTAL, thanks! i'm using int rather than unsigned since it ...
3 years, 9 months ago (2017-03-07 20:41:45 UTC) #12
Pete Williamson
Mostly looks good, one last thing... https://codereview.chromium.org/2729763002/diff/60001/components/offline_pages/core/background/pick_request_task.cc File components/offline_pages/core/background/pick_request_task.cc (right): https://codereview.chromium.org/2729763002/diff/60001/components/offline_pages/core/background/pick_request_task.cc#newcode128 components/offline_pages/core/background/pick_request_task.cc:128: // higher priority ...
3 years, 9 months ago (2017-03-07 20:57:02 UTC) #13
romax
New patch after discussion offline, PTAL, thanks!
3 years, 9 months ago (2017-03-08 00:35:38 UTC) #14
Pete Williamson
https://codereview.chromium.org/2729763002/diff/80001/components/offline_pages/core/background/request_coordinator.h File components/offline_pages/core/background/request_coordinator.h (right): https://codereview.chromium.org/2729763002/diff/80001/components/offline_pages/core/background/request_coordinator.h#newcode456 components/offline_pages/core/background/request_coordinator.h:456: // edited by request_picker_task. Owning it here for persistency. ...
3 years, 9 months ago (2017-03-08 02:04:21 UTC) #15
romax
Updated the comments describing prioritized_requests_. Not sure it's clear enough for future maintenance, open to ...
3 years, 9 months ago (2017-03-08 02:19:58 UTC) #16
fgorski
looks better. A few comments to handle. https://codereview.chromium.org/2729763002/diff/100001/components/offline_pages/core/background/pick_request_task.cc File components/offline_pages/core/background/pick_request_task.cc (right): https://codereview.chromium.org/2729763002/diff/100001/components/offline_pages/core/background/pick_request_task.cc#newcode92 components/offline_pages/core/background/pick_request_task.cc:92: std::set<int64_t> available_request_ids; ...
3 years, 9 months ago (2017-03-08 17:33:24 UTC) #17
Pete Williamson
My concerns are addressed. lgtm
3 years, 9 months ago (2017-03-08 18:17:12 UTC) #18
romax
addressed comments, PTAnL, thanks! also writing a doc about resuming behaviors, will send out later. ...
3 years, 9 months ago (2017-03-08 21:43:58 UTC) #19
fgorski
lgtm with comment https://codereview.chromium.org/2729763002/diff/120001/components/offline_pages/core/background/pick_request_task.cc File components/offline_pages/core/background/pick_request_task.cc (right): https://codereview.chromium.org/2729763002/diff/120001/components/offline_pages/core/background/pick_request_task.cc#newcode7 components/offline_pages/core/background/pick_request_task.cc:7: #include <set> #include <unordered_set> Check if ...
3 years, 9 months ago (2017-03-09 21:18:36 UTC) #20
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/2729763002/140001
3 years, 9 months ago (2017-03-09 23:00:35 UTC) #27
commit-bot: I haz the power
3 years, 9 months ago (2017-03-09 23:36:05 UTC) #30
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/50952e8e2031ad1f9d59b4f9bcf0...

Powered by Google App Engine
This is Rietveld 408576698