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

Issue 10868064: net: Move data reading functionalities from UploadElement to UploadElementReader (Closed)

Created:
8 years, 4 months ago by hashimoto
Modified:
8 years, 3 months ago
CC:
chromium-reviews, satorux1, kinuko
Visibility:
Public.

Description

net: Move data reading functionalities from UploadElement to UploadElementReader Add a new interface net::UploadElementReader and its implementations for bytes and file. Rewrite UploadDataStream using UploadElementReader. UploadElement::SetContentLength is replaced with UploadFileElementReader::ScopedOverridingContentLengthForTests. HttpNetworkTransactionSpdy(2|3)Test.UnreadableUploadFileAfterAuthRestart is bit modified since a new FileStream is created every time when UploadDataStream is initialized. BUG=145329 TEST=net_unittests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=156113

Patch Set 1 : _ #

Total comments: 4

Patch Set 2 : Fix win build, introduce UploadElementReader::Create #

Patch Set 3 : rebase #

Total comments: 2

Patch Set 4 : rebase #

Total comments: 16

Patch Set 5 : Split upload_element_reader.cc into three files #

Total comments: 12

Patch Set 6 : Review fix #

Patch Set 7 : rebase #

Patch Set 8 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+615 lines, -267 lines) Patch
A net/base/upload_bytes_element_reader.h View 1 2 3 4 1 chunk +36 lines, -0 lines 0 comments Download
A net/base/upload_bytes_element_reader.cc View 1 2 3 4 1 chunk +54 lines, -0 lines 0 comments Download
A net/base/upload_bytes_element_reader_unittest.cc View 1 2 3 4 5 1 chunk +61 lines, -0 lines 0 comments Download
M net/base/upload_data_stream.h View 2 chunks +3 lines, -1 line 0 comments Download
M net/base/upload_data_stream.cc View 1 2 3 4 5 5 chunks +37 lines, -46 lines 0 comments Download
M net/base/upload_data_stream_unittest.cc View 1 2 3 4 2 chunks +4 lines, -1 line 0 comments Download
M net/base/upload_element.h View 1 2 3 chunks +0 lines, -57 lines 0 comments Download
M net/base/upload_element.cc View 1 2 1 chunk +1 line, -156 lines 0 comments Download
A net/base/upload_element_reader.h View 1 2 3 4 1 chunk +50 lines, -0 lines 0 comments Download
A net/base/upload_element_reader.cc View 1 2 3 4 1 chunk +38 lines, -0 lines 0 comments Download
A net/base/upload_file_element_reader.h View 1 2 3 4 5 1 chunk +63 lines, -0 lines 0 comments Download
A net/base/upload_file_element_reader.cc View 1 2 3 4 1 chunk +142 lines, -0 lines 0 comments Download
A net/base/upload_file_element_reader_unittest.cc View 1 2 3 4 1 chunk +110 lines, -0 lines 0 comments Download
M net/http/http_network_transaction_spdy2_unittest.cc View 1 2 3 4 3 chunks +4 lines, -3 lines 0 comments Download
M net/http/http_network_transaction_spdy3_unittest.cc View 1 2 3 4 3 chunks +4 lines, -3 lines 0 comments Download
M net/net.gyp View 1 2 3 4 5 6 7 2 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
hashimoto
willchan, Could you review this change? This change depends on my previous change, http://codereview.chromium.org/10878082/
8 years, 3 months ago (2012-08-28 20:28:56 UTC) #1
satorux1
Drive-by comments. Two meta comments: 1) 72001 is abused. please file sub issues for divided ...
8 years, 3 months ago (2012-08-28 20:42:35 UTC) #2
hashimoto
On 2012/08/28 20:42:35, satorux1 wrote: > Drive-by comments. Two meta comments: > > 1) 72001 ...
8 years, 3 months ago (2012-08-28 21:13:44 UTC) #3
hashimoto
http://codereview.chromium.org/10868064/diff/18001/net/base/upload_data_stream.cc File net/base/upload_data_stream.cc (right): http://codereview.chromium.org/10868064/diff/18001/net/base/upload_data_stream.cc#newcode32 net/base/upload_data_stream.cc:32: UploadElementReader* reader = NULL; On 2012/08/28 20:42:35, satorux1 wrote: ...
8 years, 3 months ago (2012-08-28 21:41:20 UTC) #4
willchan no longer on Chromium
Sorry, didn't finish this. Will look later. http://codereview.chromium.org/10868064/diff/36001/net/base/upload_data_stream.cc File net/base/upload_data_stream.cc (right): http://codereview.chromium.org/10868064/diff/36001/net/base/upload_data_stream.cc#newcode84 net/base/upload_data_stream.cc:84: base::ThreadRestrictions::ScopedAllowIO allow_io; ...
8 years, 3 months ago (2012-09-01 01:40:17 UTC) #5
hashimoto
http://codereview.chromium.org/10868064/diff/36001/net/base/upload_data_stream.cc File net/base/upload_data_stream.cc (right): http://codereview.chromium.org/10868064/diff/36001/net/base/upload_data_stream.cc#newcode84 net/base/upload_data_stream.cc:84: base::ThreadRestrictions::ScopedAllowIO allow_io; On 2012/09/01 01:40:18, willchan wrote: > This ...
8 years, 3 months ago (2012-09-01 01:51:53 UTC) #6
willchan no longer on Chromium
http://codereview.chromium.org/10868064/diff/36002/net/base/upload_data_stream.cc File net/base/upload_data_stream.cc (right): http://codereview.chromium.org/10868064/diff/36002/net/base/upload_data_stream.cc#newcode36 net/base/upload_data_stream.cc:36: base::ThreadRestrictions::ScopedAllowIO allow_io; Shouldn't this be moved to the specific ...
8 years, 3 months ago (2012-09-05 02:55:59 UTC) #7
kinuko
(Drive-by) http://codereview.chromium.org/10868064/diff/36002/net/base/upload_element_reader.h File net/base/upload_element_reader.h (right): http://codereview.chromium.org/10868064/diff/36002/net/base/upload_element_reader.h#newcode22 net/base/upload_element_reader.h:22: class NET_EXPORT UploadElementReader { On 2012/09/05 02:55:59, willchan ...
8 years, 3 months ago (2012-09-05 03:24:32 UTC) #8
hashimoto
http://codereview.chromium.org/10868064/diff/36002/net/base/upload_data_stream.cc File net/base/upload_data_stream.cc (right): http://codereview.chromium.org/10868064/diff/36002/net/base/upload_data_stream.cc#newcode36 net/base/upload_data_stream.cc:36: base::ThreadRestrictions::ScopedAllowIO allow_io; On 2012/09/05 02:55:59, willchan wrote: > Shouldn't ...
8 years, 3 months ago (2012-09-05 22:00:55 UTC) #9
willchan no longer on Chromium
http://codereview.chromium.org/10868064/diff/36002/net/base/upload_data_stream.cc File net/base/upload_data_stream.cc (right): http://codereview.chromium.org/10868064/diff/36002/net/base/upload_data_stream.cc#newcode36 net/base/upload_data_stream.cc:36: base::ThreadRestrictions::ScopedAllowIO allow_io; On 2012/09/05 22:00:55, hashimoto wrote: > On ...
8 years, 3 months ago (2012-09-06 01:06:01 UTC) #10
hashimoto
http://codereview.chromium.org/10868064/diff/39004/net/base/upload_bytes_element_reader_unittest.cc File net/base/upload_bytes_element_reader_unittest.cc (right): http://codereview.chromium.org/10868064/diff/39004/net/base/upload_bytes_element_reader_unittest.cc#newcode18 net/base/upload_bytes_element_reader_unittest.cc:18: bytes_.assign(kData, kData + arraysize(kData)); On 2012/09/06 01:06:01, willchan wrote: ...
8 years, 3 months ago (2012-09-06 01:55:39 UTC) #11
hashimoto
ping?
8 years, 3 months ago (2012-09-07 17:27:44 UTC) #12
willchan no longer on Chromium
lgtm
8 years, 3 months ago (2012-09-10 21:32:13 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hashimoto@chromium.org/10868064/42002
8 years, 3 months ago (2012-09-10 21:42:14 UTC) #14
commit-bot: I haz the power
Presubmit check for 10868064-42002 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 3 months ago (2012-09-10 21:42:24 UTC) #15
hashimoto
On 2012/09/10 21:42:24, I haz the power (commit-bot) wrote: > Presubmit check for 10868064-42002 failed ...
8 years, 3 months ago (2012-09-11 03:38:11 UTC) #16
willchan no longer on Chromium
8 years, 3 months ago (2012-09-11 18:46:33 UTC) #17
SGTM


On Mon, Sep 10, 2012 at 8:38 PM, <hashimoto@chromium.org> wrote:

> On 2012/09/10 21:42:24, I haz the power (commit-bot) wrote:
>
>> Presubmit check for 10868064-42002 failed and returned exit status 1.
>>
>
>
>  Running presubmit commit checks ...
>>
>
>  ** Presubmit ERRORS **
>> Banned functions were used.
>>      net/base/upload_file_element_**reader.cc:37:
>>        New code should not use ScopedAllowIO. Post a task to the blocking
>>        pool or the FILE thread instead.
>>      net/base/upload_file_element_**reader.cc:44:
>>        New code should not use ScopedAllowIO. Post a task to the blocking
>>        pool or the FILE thread instead.
>>      net/base/upload_file_element_**reader.cc:106:
>>        New code should not use ScopedAllowIO. Post a task to the blocking
>>        pool or the FILE thread instead.
>>
>
>  Presubmit checks took 1.9s to calculate.
>>
>
> Going to bypass hooks since ScopedAllowIO in this change is just moved
> from one
> place to another.
>
>
http://codereview.chromium.**org/10868064/<http://codereview.chromium.org/108...
>

Powered by Google App Engine
This is Rietveld 408576698