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

Issue 2728673003: Add a utility function to calculate the next slice to download (Closed)

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

Description

Add a utility function to calculate the next slice to download For parallel downloading, the received slices may not be next to each other. This CL adds a helper function to calculate the next slice to download. This new slice will fill up the first hole in the received slice vector. BUG=644352 Review-Url: https://codereview.chromium.org/2728673003 Cr-Commit-Position: refs/heads/master@{#454194} Committed: https://chromium.googlesource.com/chromium/src/+/41a4abfd6e8d1cfa7bbf3024ac21565c5b66e1b4

Patch Set 1 #

Total comments: 11

Patch Set 2 : fix DCHECK and a case when starting offset != 0 #

Patch Set 3 : addressing comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -1 line) Patch
M content/browser/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/download/download_item_impl.cc View 1 2 2 chunks +8 lines, -1 line 0 comments Download
A content/browser/download/parallel_download_utils.h View 1 1 chunk +23 lines, -0 lines 0 comments Download
A content/browser/download/parallel_download_utils.cc View 1 2 1 chunk +41 lines, -0 lines 0 comments Download
A content/browser/download/parallel_download_utils_unittest.cc View 1 2 1 chunk +42 lines, -0 lines 0 comments Download
M content/test/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 40 (30 generated)
qinmin
PTAL +boliu@ for content/browser/BUILD.gn +xingliu@ for code review
3 years, 9 months ago (2017-03-01 21:03:46 UTC) #2
xingliu
https://codereview.chromium.org/2728673003/diff/20001/content/browser/download/download_item_impl.cc File content/browser/download/download_item_impl.cc (right): https://codereview.chromium.org/2728673003/diff/20001/content/browser/download/download_item_impl.cc#newcode1948 content/browser/download/download_item_impl.cc:1948: if (received_slices_.size() > 1) { Does FindNextSliceToDownload assume the ...
3 years, 9 months ago (2017-03-01 23:03:59 UTC) #8
qinmin
https://codereview.chromium.org/2728673003/diff/20001/content/browser/download/download_item_impl.cc File content/browser/download/download_item_impl.cc (right): https://codereview.chromium.org/2728673003/diff/20001/content/browser/download/download_item_impl.cc#newcode1948 content/browser/download/download_item_impl.cc:1948: if (received_slices_.size() > 1) { On 2017/03/01 23:03:59, xingliu ...
3 years, 9 months ago (2017-03-01 23:25:28 UTC) #9
qinmin
https://codereview.chromium.org/2728673003/diff/20001/content/browser/download/parallel_download_utils.cc File content/browser/download/parallel_download_utils.cc (right): https://codereview.chromium.org/2728673003/diff/20001/content/browser/download/parallel_download_utils.cc#newcode25 content/browser/download/parallel_download_utils.cc:25: DCHECK_LT(remaining_bytes, 0); On 2017/03/01 23:25:28, qinmin wrote: > Yes, ...
3 years, 9 months ago (2017-03-01 23:41:17 UTC) #14
xingliu
https://codereview.chromium.org/2728673003/diff/20001/content/browser/download/download_item_impl.cc File content/browser/download/download_item_impl.cc (right): https://codereview.chromium.org/2728673003/diff/20001/content/browser/download/download_item_impl.cc#newcode1948 content/browser/download/download_item_impl.cc:1948: if (received_slices_.size() > 1) { On 2017/03/01 23:25:27, qinmin ...
3 years, 9 months ago (2017-03-02 00:23:51 UTC) #26
qinmin
https://codereview.chromium.org/2728673003/diff/20001/content/browser/download/download_item_impl.cc File content/browser/download/download_item_impl.cc (right): https://codereview.chromium.org/2728673003/diff/20001/content/browser/download/download_item_impl.cc#newcode1948 content/browser/download/download_item_impl.cc:1948: if (received_slices_.size() > 1) { On 2017/03/02 00:23:51, xingliu ...
3 years, 9 months ago (2017-03-02 01:00:39 UTC) #31
xingliu
lgtm
3 years, 9 months ago (2017-03-02 01:20:54 UTC) #32
boliu
content/browser/BUILD.gn rs lgtm
3 years, 9 months ago (2017-03-02 02:24:29 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/2728673003/110001
3 years, 9 months ago (2017-03-02 06:16:51 UTC) #37
commit-bot: I haz the power
3 years, 9 months ago (2017-03-02 06:22:25 UTC) #40
Message was sent while issue was closed.
Committed patchset #3 (id:110001) as
https://chromium.googlesource.com/chromium/src/+/41a4abfd6e8d1cfa7bbf3024ac21...

Powered by Google App Engine
This is Rietveld 408576698