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

Issue 2744793003: Move the logic to determine how much data can be written to another function (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

Move the logic to determine how much data can be written to another function The logic to calculate how much data to write is getting bigger, move to a separate function. This CL also adds a check if the target location is already written. If so, it will request the current stream to terminate. Unit test will pass once https://codereview.chromium.org/2737033002/ lands BUG=644352 Review-Url: https://codereview.chromium.org/2744793003 Cr-Commit-Position: refs/heads/master@{#457839} Committed: https://chromium.googlesource.com/chromium/src/+/457f1988af83ecf544aa76a8ee8126f6ac980c41

Patch Set 1 #

Total comments: 4

Patch Set 2 : comments #

Total comments: 9

Patch Set 3 : addressing comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -23 lines) Patch
M content/browser/download/download_file_impl.h View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M content/browser/download/download_file_impl.cc View 1 2 3 chunks +40 lines, -16 lines 0 comments Download
M content/browser/download/download_file_unittest.cc View 1 2 8 chunks +46 lines, -7 lines 0 comments Download

Messages

Total messages: 29 (18 generated)
qinmin
PTAL
3 years, 9 months ago (2017-03-10 20:47:17 UTC) #2
xingliu
lgtm with nits% https://codereview.chromium.org/2744793003/diff/1/content/browser/download/download_file_impl.cc File content/browser/download/download_file_impl.cc (right): https://codereview.chromium.org/2744793003/diff/1/content/browser/download/download_file_impl.cc#newcode171 content/browser/download/download_file_impl.cc:171: if (source_stream->length() != DownloadSaveInfo::kLengthFullContent && nit%: ...
3 years, 9 months ago (2017-03-11 00:11:46 UTC) #5
qinmin
https://codereview.chromium.org/2744793003/diff/1/content/browser/download/download_file_impl.cc File content/browser/download/download_file_impl.cc (right): https://codereview.chromium.org/2744793003/diff/1/content/browser/download/download_file_impl.cc#newcode171 content/browser/download/download_file_impl.cc:171: if (source_stream->length() != DownloadSaveInfo::kLengthFullContent && On 2017/03/11 00:11:46, xingliu ...
3 years, 9 months ago (2017-03-14 23:24:51 UTC) #9
xingliu
On 2017/03/14 23:24:51, qinmin wrote: > https://codereview.chromium.org/2744793003/diff/1/content/browser/download/download_file_impl.cc > File content/browser/download/download_file_impl.cc (right): > > https://codereview.chromium.org/2744793003/diff/1/content/browser/download/download_file_impl.cc#newcode171 > ...
3 years, 9 months ago (2017-03-14 23:26:20 UTC) #12
David Trainor- moved to gerrit
https://codereview.chromium.org/2744793003/diff/40001/content/browser/download/download_file_impl.cc File content/browser/download/download_file_impl.cc (right): https://codereview.chromium.org/2744793003/diff/40001/content/browser/download/download_file_impl.cc#newcode161 content/browser/download/download_file_impl.cc:161: size_t bytes_read, bytes_available_to_write more clear? https://codereview.chromium.org/2744793003/diff/40001/content/browser/download/download_file_impl.cc#newcode163 content/browser/download/download_file_impl.cc:163: // If ...
3 years, 9 months ago (2017-03-15 22:35:43 UTC) #15
qinmin
https://codereview.chromium.org/2744793003/diff/40001/content/browser/download/download_file_impl.cc File content/browser/download/download_file_impl.cc (right): https://codereview.chromium.org/2744793003/diff/40001/content/browser/download/download_file_impl.cc#newcode161 content/browser/download/download_file_impl.cc:161: size_t bytes_read, On 2017/03/15 22:35:42, David Trainor-ping if over ...
3 years, 9 months ago (2017-03-16 00:15:49 UTC) #16
qinmin
ping, dtrainor@, is this change good to go now?
3 years, 9 months ago (2017-03-16 20:51:04 UTC) #17
David Trainor- moved to gerrit
lgtm https://codereview.chromium.org/2744793003/diff/40001/content/browser/download/download_file_impl.cc File content/browser/download/download_file_impl.cc (right): https://codereview.chromium.org/2744793003/diff/40001/content/browser/download/download_file_impl.cc#newcode176 content/browser/download/download_file_impl.cc:176: if (source_stream->length() != DownloadSaveInfo::kLengthFullContent && On 2017/03/16 00:15:49, ...
3 years, 9 months ago (2017-03-17 07:26:51 UTC) #18
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/2744793003/60001
3 years, 9 months ago (2017-03-17 17:23:19 UTC) #21
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/2744793003/80001
3 years, 9 months ago (2017-03-17 17:28:10 UTC) #26
commit-bot: I haz the power
3 years, 9 months ago (2017-03-17 19:08:59 UTC) #29
Message was sent while issue was closed.
Committed patchset #3 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/457f1988af83ecf544aa76a8ee81...

Powered by Google App Engine
This is Rietveld 408576698