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

Issue 2660783002: Range request support for parallel download in DownloadRequestCore. (Closed)

Created:
3 years, 10 months ago by xingliu
Modified:
3 years, 10 months ago
CC:
asanka, chromium-reviews, darin-cc_chromium.org, jam
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Range request support for parallel download in DownloadRequestCore. 1. Add range request handling for parallel download, controlled by DownloadUrlParameters. Currently put the logic in DownloadRequestCore, if requests logic defers too much, we can pull out to a new builder class. Download resumption Range header: Range:100- Parallel download Range header: Range:100-149 2. Add a unit test for DownloadRequestCore to ensure requests are correctly built. BUG=644352 Review-Url: https://codereview.chromium.org/2660783002 Cr-Commit-Position: refs/heads/master@{#449171} Committed: https://chromium.googlesource.com/chromium/src/+/fed7466d012f7593c11843b2a98d3c4326c54ac9

Patch Set 1 #

Patch Set 2 : Add const to test functions. #

Total comments: 4

Patch Set 3 : Strong validator for all range request. #

Total comments: 12

Patch Set 4 : Work on feedbacks. #

Total comments: 4

Patch Set 5 : If-Range and better unit tests. #

Patch Set 6 : Remove debug code. #

Total comments: 16

Patch Set 7 : Add 402 handling, and nits. #

Patch Set 8 : Remove unused run_loop in unittest. #

Patch Set 9 : Fix chrome unit test. #

Patch Set 10 : Remove http 402 handling so won't touch extension api for now. #

Total comments: 6

Patch Set 11 : Work on feedbacks. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+231 lines, -23 lines) Patch
M content/browser/download/download_request_core.cc View 1 2 3 4 5 6 7 8 9 10 8 chunks +61 lines, -20 lines 0 comments Download
A content/browser/download/download_request_core_unittest.cc View 1 2 3 4 5 6 7 1 chunk +140 lines, -0 lines 0 comments Download
M content/public/browser/download_save_info.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +11 lines, -0 lines 0 comments Download
M content/public/browser/download_save_info.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -2 lines 0 comments Download
M content/public/browser/download_url_parameters.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +9 lines, -1 line 0 comments Download
M content/test/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M net/http/http_request_headers.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M net/http/http_request_headers.cc View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (27 generated)
xingliu
Hi, PHTAL, thanks.
3 years, 10 months ago (2017-01-30 17:49:37 UTC) #3
qinmin
https://codereview.chromium.org/2660783002/diff/20001/content/browser/download/download_request_core.cc File content/browser/download/download_request_core.cc (right): https://codereview.chromium.org/2660783002/diff/20001/content/browser/download/download_request_core.cc#newcode162 content/browser/download/download_request_core.cc:162: DCHECK(params->offset() == 0 || params->length() > 0 || has_etag ...
3 years, 10 months ago (2017-01-31 19:25:56 UTC) #4
xingliu
https://codereview.chromium.org/2660783002/diff/20001/content/browser/download/download_request_core.cc File content/browser/download/download_request_core.cc (right): https://codereview.chromium.org/2660783002/diff/20001/content/browser/download/download_request_core.cc#newcode162 content/browser/download/download_request_core.cc:162: DCHECK(params->offset() == 0 || params->length() > 0 || has_etag ...
3 years, 10 months ago (2017-01-31 21:32:25 UTC) #5
asanka
Is the plan to download the stripes into multiple files? https://codereview.chromium.org/2660783002/diff/40001/content/browser/download/download_request_core.cc File content/browser/download/download_request_core.cc (right): https://codereview.chromium.org/2660783002/diff/40001/content/browser/download/download_request_core.cc#newcode176 ...
3 years, 10 months ago (2017-02-01 02:53:37 UTC) #6
David Trainor- moved to gerrit
https://codereview.chromium.org/2660783002/diff/40001/content/public/browser/download_save_info.h File content/public/browser/download_save_info.h (right): https://codereview.chromium.org/2660783002/diff/40001/content/public/browser/download_save_info.h#newcode26 content/public/browser/download_save_info.h:26: static const int kLengthUnknown; I don't feel strongly, but ...
3 years, 10 months ago (2017-02-01 07:14:36 UTC) #7
xingliu
Thank you all for the review. @asanka, we probably will write to the same file ...
3 years, 10 months ago (2017-02-01 20:25:46 UTC) #8
asanka
https://codereview.chromium.org/2660783002/diff/60001/content/browser/download/download_request_core.cc File content/browser/download/download_request_core.cc (right): https://codereview.chromium.org/2660783002/diff/60001/content/browser/download/download_request_core.cc#newcode169 content/browser/download/download_request_core.cc:169: params->length() > DownloadSaveInfo::kLengthFullContent) && This expression requires that kLengthFullContent ...
3 years, 10 months ago (2017-02-01 22:51:17 UTC) #9
xingliu
https://codereview.chromium.org/2660783002/diff/60001/content/browser/download/download_request_core.cc File content/browser/download/download_request_core.cc (right): https://codereview.chromium.org/2660783002/diff/60001/content/browser/download/download_request_core.cc#newcode169 content/browser/download/download_request_core.cc:169: params->length() > DownloadSaveInfo::kLengthFullContent) && On 2017/02/01 22:51:17, asanka wrote: ...
3 years, 10 months ago (2017-02-02 05:46:36 UTC) #12
asanka
LG so far. This should be good to go after adding the handling for HTTP ...
3 years, 10 months ago (2017-02-03 22:16:23 UTC) #15
xingliu
Hi, I tried to add PRECONDITION_FAILED back in interrupt reason, but it needs to touch ...
3 years, 10 months ago (2017-02-06 19:31:40 UTC) #24
xingliu
Ping, please help take another look. Thanks. For http 402, since eventually it will modify ...
3 years, 10 months ago (2017-02-07 01:01:28 UTC) #27
xingliu
alexmos@chromium.org: Hi, Alex, please help review content/public/browser/* in this CL.
3 years, 10 months ago (2017-02-07 22:06:39 UTC) #31
asanka
lgtm Ultimately the PRECONDITION_FAILED interrupt reason would only be used when dealing with sharded requests. ...
3 years, 10 months ago (2017-02-08 05:02:59 UTC) #32
alexmos
content/public/browser LGTM with nits https://codereview.chromium.org/2660783002/diff/180001/content/public/browser/download_save_info.h File content/public/browser/download_save_info.h (right): https://codereview.chromium.org/2660783002/diff/180001/content/public/browser/download_save_info.h#newcode26 content/public/browser/download_save_info.h:26: static const int kLengthFullContent; Up ...
3 years, 10 months ago (2017-02-08 06:52:48 UTC) #33
David Trainor- moved to gerrit
lgtm
3 years, 10 months ago (2017-02-08 07:45:48 UTC) #34
qinmin
lgtm % nits https://codereview.chromium.org/2660783002/diff/180001/content/browser/download/download_request_core.cc File content/browser/download/download_request_core.cc (right): https://codereview.chromium.org/2660783002/diff/180001/content/browser/download/download_request_core.cc#newcode200 content/browser/download/download_request_core.cc:200: if (has_etag) nit: use{} for if ...
3 years, 10 months ago (2017-02-08 17:10:39 UTC) #35
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/2660783002/200001
3 years, 10 months ago (2017-02-09 01:00:06 UTC) #42
commit-bot: I haz the power
3 years, 10 months ago (2017-02-09 01:07:59 UTC) #45
Message was sent while issue was closed.
Committed patchset #11 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/fed7466d012f7593c11843b2a98d...

Powered by Google App Engine
This is Rietveld 408576698