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

Issue 2742093002: Glue parallel download job and download file together. (Closed)

Created:
3 years, 9 months ago by xingliu
Modified:
3 years, 9 months ago
CC:
chromium-reviews, asanka, jam, kinuko+watch, darin-cc_chromium.org, blink-worker-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Glue parallel download job and download file together. 1. Connect the parallel download job to download file, so we can generate requests and push the byte streams to download file. 2. Move 2 utility functions into parallel_download_util. 3. Tweak the test fixture for parallel download job, now it can take a ReceivedSlice. And we target to test BuildParallelRequests now. So we can add unittests for resumption later. The unittests for communication between classes will be added later. 4. Refactor download_file_unittests, now it may accept more streams. BUG=644352 Review-Url: https://codereview.chromium.org/2742093002 Cr-Commit-Position: refs/heads/master@{#457952} Committed: https://chromium.googlesource.com/chromium/src/+/6719c20584c6c916a4f5820a0f3b458ab612dfad

Patch Set 1 #

Total comments: 14

Patch Set 2 : Work on feedback. #

Total comments: 7

Patch Set 3 : Work on feedback. #

Total comments: 14

Patch Set 4 : Work on feedback. #

Total comments: 14

Patch Set 5 : Work on comments. #

Patch Set 6 : Rebase, and adjust unittests with recent landed CLs. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+429 lines, -299 lines) Patch
M content/browser/download/download_create_info.h View 1 2 3 4 1 chunk +8 lines, -1 line 0 comments Download
M content/browser/download/download_create_info.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/download/download_file.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/download/download_file_impl.h View 1 2 3 4 5 3 chunks +5 lines, -11 lines 0 comments Download
M content/browser/download/download_file_impl.cc View 1 2 3 4 5 4 chunks +19 lines, -22 lines 0 comments Download
M content/browser/download/download_file_unittest.cc View 1 2 3 4 5 11 chunks +112 lines, -133 lines 0 comments Download
M content/browser/download/download_job.h View 2 chunks +6 lines, -0 lines 0 comments Download
M content/browser/download/download_job.cc View 1 2 3 4 2 chunks +24 lines, -0 lines 0 comments Download
M content/browser/download/download_job_factory.cc View 1 chunk +0 lines, -22 lines 0 comments Download
M content/browser/download/download_request_core.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/download/download_worker.h View 2 chunks +24 lines, -1 line 0 comments Download
M content/browser/download/download_worker.cc View 2 chunks +9 lines, -1 line 0 comments Download
M content/browser/download/mock_download_file.h View 1 chunk +6 lines, -3 lines 0 comments Download
M content/browser/download/mock_download_file.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/download/mock_download_item_impl.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/download/mock_download_item_impl.cc View 2 chunks +7 lines, -2 lines 0 comments Download
M content/browser/download/parallel_download_job.h View 1 2 3 4 5 3 chunks +28 lines, -17 lines 0 comments Download
M content/browser/download/parallel_download_job.cc View 1 2 3 4 5 6 chunks +56 lines, -50 lines 0 comments Download
M content/browser/download/parallel_download_job_unittest.cc View 1 2 3 4 2 chunks +60 lines, -33 lines 0 comments Download
M content/browser/download/parallel_download_utils.h View 1 2 3 4 5 1 chunk +12 lines, -0 lines 0 comments Download
M content/browser/download/parallel_download_utils.cc View 1 2 3 4 5 1 chunk +42 lines, -0 lines 0 comments Download
M content/public/browser/download_item.h View 1 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (17 generated)
xingliu
Hi, PHTAL, thanks.
3 years, 9 months ago (2017-03-10 22:31:26 UTC) #2
qinmin
https://codereview.chromium.org/2742093002/diff/1/content/browser/download/parallel_download_job.cc File content/browser/download/parallel_download_job.cc (right): https://codereview.chromium.org/2742093002/diff/1/content/browser/download/parallel_download_job.cc#newcode74 content/browser/download/parallel_download_job.cc:74: initial_request_offset_, content_length_, GetParallelRequestCount()); nit: shouldn't the initial_request_offset_ always be ...
3 years, 9 months ago (2017-03-11 06:08:22 UTC) #3
xingliu
Thanks for the feedback, PTAL. https://codereview.chromium.org/2742093002/diff/1/content/browser/download/parallel_download_job.cc File content/browser/download/parallel_download_job.cc (right): https://codereview.chromium.org/2742093002/diff/1/content/browser/download/parallel_download_job.cc#newcode74 content/browser/download/parallel_download_job.cc:74: initial_request_offset_, content_length_, GetParallelRequestCount()); On ...
3 years, 9 months ago (2017-03-13 17:53:17 UTC) #4
David Trainor- moved to gerrit
https://codereview.chromium.org/2742093002/diff/20001/content/browser/download/download_file_unittest.cc File content/browser/download/download_file_unittest.cc (right): https://codereview.chromium.org/2742093002/diff/20001/content/browser/download/download_file_unittest.cc#newcode212 content/browser/download/download_file_unittest.cc:212: const std::vector<DownloadItem::ReceivedSlice>& received_slices = Should we pull this out ...
3 years, 9 months ago (2017-03-14 17:59:10 UTC) #9
xingliu
Thanks for the feedback, PTAL. https://codereview.chromium.org/2742093002/diff/20001/content/browser/download/download_file_unittest.cc File content/browser/download/download_file_unittest.cc (right): https://codereview.chromium.org/2742093002/diff/20001/content/browser/download/download_file_unittest.cc#newcode212 content/browser/download/download_file_unittest.cc:212: const std::vector<DownloadItem::ReceivedSlice>& received_slices = ...
3 years, 9 months ago (2017-03-14 18:26:31 UTC) #11
asanka
https://codereview.chromium.org/2742093002/diff/40001/content/browser/download/download_create_info.h File content/browser/download/download_create_info.h (right): https://codereview.chromium.org/2742093002/diff/40001/content/browser/download/download_create_info.h#newcode66 content/browser/download/download_create_info.h:66: int64_t offset; Do you expect this to be different ...
3 years, 9 months ago (2017-03-14 19:44:02 UTC) #15
xingliu
Thanks for the review, PTAL. https://codereview.chromium.org/2742093002/diff/40001/content/browser/download/download_create_info.h File content/browser/download/download_create_info.h (right): https://codereview.chromium.org/2742093002/diff/40001/content/browser/download/download_create_info.h#newcode66 content/browser/download/download_create_info.h:66: int64_t offset; On 2017/03/14 ...
3 years, 9 months ago (2017-03-14 22:48:29 UTC) #16
xingliu
ping~
3 years, 9 months ago (2017-03-16 00:13:06 UTC) #17
David Trainor- moved to gerrit
lgtm % other reviewers. https://codereview.chromium.org/2742093002/diff/20001/content/browser/download/download_job.cc File content/browser/download/download_job.cc (right): https://codereview.chromium.org/2742093002/diff/20001/content/browser/download/download_job.cc#newcode37 content/browser/download/download_job.cc:37: return; On 2017/03/14 18:26:31, xingliu ...
3 years, 9 months ago (2017-03-17 07:15:27 UTC) #18
qinmin
https://codereview.chromium.org/2742093002/diff/60001/content/browser/download/download_file_impl.cc File content/browser/download/download_file_impl.cc (right): https://codereview.chromium.org/2742093002/diff/60001/content/browser/download/download_file_impl.cc#newcode80 content/browser/download/download_file_impl.cc:80: save_info_->offset, DownloadSaveInfo::kLengthFullContent, actually, this is no longer true. For ...
3 years, 9 months ago (2017-03-17 07:54:36 UTC) #19
asanka
LGTM % nits. Let's see what happens when we put everything together. :-) I wasn't ...
3 years, 9 months ago (2017-03-17 17:10:10 UTC) #20
xingliu
Thanks for the feedbacks. I manually test this CL a little bit on eclipse download ...
3 years, 9 months ago (2017-03-17 19:08:26 UTC) #21
xingliu
@alexmos, Hi, alex can you help take a look at content/public/browser/download_item.h Thanks.
3 years, 9 months ago (2017-03-17 20:47:42 UTC) #23
alexmos
content/public/browser/download_item.h LGTM
3 years, 9 months ago (2017-03-17 20:54:02 UTC) #24
qinmin
lgtm
3 years, 9 months ago (2017-03-17 21:58:39 UTC) #25
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/2742093002/100001
3 years, 9 months ago (2017-03-18 03:09:43 UTC) #31
commit-bot: I haz the power
3 years, 9 months ago (2017-03-18 03:46:08 UTC) #34
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/6719c20584c6c916a4f5820a0f3b...

Powered by Google App Engine
This is Rietveld 408576698