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

Issue 1250002: Report unreadable files as size zero when uploading. (Closed)

Created:
10 years, 9 months ago by vandebo (ex-Chrome)
Modified:
9 years, 7 months ago
Reviewers:
James Hawkins, agl, eroman, wtc
CC:
chromium-reviews, darin-cc_chromium.org, jam+cc_chromium.org, ben+cc_chromium.org, brettw-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Report unreadable files as size zero when uploading. Upload zero bytes if the file size shrinks. BUG=30850 TEST=uploading an unreadable file works Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=42981

Patch Set 1 #

Patch Set 2 : Also zerofill remaining expect data #

Patch Set 3 : Compile fixes #

Patch Set 4 : Work correctly for empty files. #

Patch Set 5 : Update test - we never have a short file now #

Total comments: 8

Patch Set 6 : Address comments #

Patch Set 7 : Cleanup file_ in case it didn't get used #

Patch Set 8 : Add unit test #

Patch Set 9 : Add windows chmod code #

Total comments: 48

Patch Set 10 : Rebase and address windows comments #

Total comments: 1

Patch Set 11 : Address comments #

Patch Set 12 : Compile fix and r42559 cleanup #

Patch Set 13 : Arg - Windows build fix #

Total comments: 6

Patch Set 14 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+326 lines, -65 lines) Patch
M base/file_util.h View 8 9 10 2 chunks +54 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host.cc View 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/common/common_param_traits.h View 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M net/base/upload_data.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +23 lines, -5 lines 0 comments Download
M net/base/upload_data.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +51 lines, -6 lines 0 comments Download
M net/base/upload_data_stream.h View 1 2 3 4 5 6 7 8 9 4 chunks +5 lines, -5 lines 0 comments Download
M net/base/upload_data_stream.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +38 lines, -45 lines 0 comments Download
M net/base/upload_data_stream_unittest.cc View 5 6 7 8 9 10 1 chunk +3 lines, -1 line 0 comments Download
M net/http/http_network_transaction_unittest.cc View 8 9 10 11 12 13 2 chunks +149 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
vandebo (ex-Chrome)
Will add agl and darin if this looks reasonable.
10 years, 9 months ago (2010-03-25 00:22:18 UTC) #1
wtc
vandebo: thanks a lot for taking this on. eroman: do you have spare cycles to ...
10 years, 9 months ago (2010-03-25 02:03:36 UTC) #2
eroman
wtc: I will review it now. Hopefully we can get it finished tonight, since I ...
10 years, 9 months ago (2010-03-25 02:24:07 UTC) #3
eroman
Can you add a unit-test for this case? http://codereview.chromium.org/1250002/diff/10001/11003 File net/base/upload_data.cc (right): http://codereview.chromium.org/1250002/diff/10001/11003#newcode62 net/base/upload_data.cc:62: return ...
10 years, 9 months ago (2010-03-25 03:28:58 UTC) #4
vandebo (ex-Chrome)
I'll add a unit test tomorrow. http://codereview.chromium.org/1250002/diff/10001/11003 File net/base/upload_data.cc (right): http://codereview.chromium.org/1250002/diff/10001/11003#newcode62 net/base/upload_data.cc:62: return file; On ...
10 years, 9 months ago (2010-03-25 06:26:51 UTC) #5
vandebo (ex-Chrome)
agl, do you have time to review this?
10 years, 9 months ago (2010-03-26 01:12:33 UTC) #6
vandebo (ex-Chrome)
James, do you have time to look at the windows code in file_util.h ?
10 years, 9 months ago (2010-03-26 02:19:54 UTC) #7
wtc
vandebo: I can review this CL first thing tomorrow morning.
10 years, 9 months ago (2010-03-26 02:24:35 UTC) #8
James Hawkins
http://codereview.chromium.org/1250002/diff/24001/25001 File base/file_util.h (right): http://codereview.chromium.org/1250002/diff/24001/25001#newcode504 base/file_util.h:504: #if defined(OS_POSIX) Does this need to be inline? If ...
10 years, 9 months ago (2010-03-26 02:38:39 UTC) #9
wtc
LGTM! vandebo, I like your CL very much. Thank you for tracking down the problem ...
10 years, 9 months ago (2010-03-26 18:51:59 UTC) #10
vandebo (ex-Chrome)
http://codereview.chromium.org/1250002/diff/24001/25001 File base/file_util.h (right): http://codereview.chromium.org/1250002/diff/24001/25001#newcode17 base/file_util.h:17: #endif // UNIT_TEST On 2010/03/26 18:51:59, wtc wrote: > ...
10 years, 9 months ago (2010-03-26 22:22:13 UTC) #11
James Hawkins
My part is LGTM.
10 years, 9 months ago (2010-03-26 22:25:24 UTC) #12
wtc
vandebo: thanks for the changes! The only problem I have is the "incorrect" use of ...
10 years, 9 months ago (2010-03-27 01:55:11 UTC) #13
vandebo (ex-Chrome)
http://codereview.chromium.org/1250002/diff/53001/54009 File net/http/http_network_transaction_unittest.cc (right): http://codereview.chromium.org/1250002/diff/53001/54009#newcode4197 net/http/http_network_transaction_unittest.cc:4197: scoped_array<char> unreadable_contents(new char[temp_file_contents.length()]); On 2010/03/27 01:55:11, wtc wrote: > ...
10 years, 8 months ago (2010-03-29 18:59:21 UTC) #14
wtc
10 years, 8 months ago (2010-03-29 19:15:34 UTC) #15
LGTM.  Thanks!

Powered by Google App Engine
This is Rietveld 408576698