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

Issue 9321003: net: Make UploadData::GetContentLength() asynchronous. (Closed)

Created:
8 years, 10 months ago by satorux1
Modified:
8 years, 10 months ago
CC:
chromium-reviews, pam+watch_chromium.org, cbentzel+watch_chromium.org, amit, jam, joi+watch-content_chromium.org, robertshield, darin-cc_chromium.org
Visibility:
Public.

Description

net: Make UploadData::GetContentLength() asynchronous. However, the asynchronous version is not used yet. The synchronous version is kept as GetContentLengthSync(). The existing code is changed to use the synchronous version. TEST=net_unittests BUG=72001, 112607 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=121411

Patch Set 1 #

Patch Set 2 : rebased #

Total comments: 13

Patch Set 3 : address comments #

Patch Set 4 : use Sync version in tests where files are not involved #

Patch Set 5 : set io restrictions in the test #

Patch Set 6 : rebased #

Total comments: 2

Patch Set 7 : remove GetContentLengthSyncHack() #

Patch Set 8 : rebased #

Total comments: 4

Patch Set 9 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+227 lines, -63 lines) Patch
M chrome_frame/plugin_url_request.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome_frame/urlmon_upload_data_stream.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/resource_dispatcher_host.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -1 line 0 comments Download
M net/base/upload_data.h View 1 2 3 4 5 6 4 chunks +16 lines, -3 lines 0 comments Download
M net/base/upload_data.cc View 1 2 3 4 5 6 7 5 chunks +39 lines, -21 lines 0 comments Download
M net/base/upload_data_stream.cc View 1 2 3 4 5 6 7 2 chunks +6 lines, -1 line 0 comments Download
M net/base/upload_data_stream_unittest.cc View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M net/base/upload_data_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +146 lines, -27 lines 0 comments Download
M net/http/http_network_transaction_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M net/spdy/spdy_network_transaction_unittest.cc View 1 2 3 4 5 2 chunks +8 lines, -5 lines 0 comments Download
M webkit/tools/test_shell/simple_resource_loader_bridge.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 18 (0 generated)
satorux1
8 years, 10 months ago (2012-02-04 00:16:55 UTC) #1
satorux1
+robertshield for chrome_frame changes.
8 years, 10 months ago (2012-02-04 01:13:50 UTC) #2
robertshield
http://codereview.chromium.org/9321003/diff/4003/chrome_frame/plugin_url_request.cc File chrome_frame/plugin_url_request.cc (right): http://codereview.chromium.org/9321003/diff/4003/chrome_frame/plugin_url_request.cc#newcode46 chrome_frame/plugin_url_request.cc:46: post_data_len_ = upload_data->GetContentLengthSyncHack(); This code runs inside Internet Explorer, ...
8 years, 10 months ago (2012-02-04 05:39:03 UTC) #3
satorux1
Robert, thank you for the comments. Hope you'll like the new version. http://codereview.chromium.org/9321003/diff/4003/chrome_frame/plugin_url_request.cc File chrome_frame/plugin_url_request.cc ...
8 years, 10 months ago (2012-02-04 07:18:32 UTC) #4
grt (UTC plus 2)
drive-by STL remark http://codereview.chromium.org/9321003/diff/4003/net/base/upload_data.cc File net/base/upload_data.cc (right): http://codereview.chromium.org/9321003/diff/4003/net/base/upload_data.cc#newcode223 net/base/upload_data.cc:223: *content_length += elements_.at(i).GetContentLength(); On 2012/02/04 07:18:32, ...
8 years, 10 months ago (2012-02-04 19:33:55 UTC) #5
robertshield
lgtm http://codereview.chromium.org/9321003/diff/4003/net/base/upload_data.cc File net/base/upload_data.cc (right): http://codereview.chromium.org/9321003/diff/4003/net/base/upload_data.cc#newcode223 net/base/upload_data.cc:223: *content_length += elements_.at(i).GetContentLength(); On 2012/02/04 19:33:56, grt wrote: ...
8 years, 10 months ago (2012-02-04 21:10:56 UTC) #6
satorux1
On 2012/02/04 19:33:55, grt wrote: > drive-by STL remark > > http://codereview.chromium.org/9321003/diff/4003/net/base/upload_data.cc > File net/base/upload_data.cc ...
8 years, 10 months ago (2012-02-04 22:40:56 UTC) #7
grt (UTC plus 2)
On 2012/02/04 22:40:56, satorux1 wrote: > Thanks. at() was replaced with [] in patch set ...
8 years, 10 months ago (2012-02-05 01:24:38 UTC) #8
satorux1
willchan@, could you take a look?
8 years, 10 months ago (2012-02-08 17:03:24 UTC) #9
willchan no longer on Chromium
http://codereview.chromium.org/9321003/diff/19001/net/base/upload_data.cc File net/base/upload_data.cc (right): http://codereview.chromium.org/9321003/diff/19001/net/base/upload_data.cc#newcode176 net/base/upload_data.cc:176: base::Bind(&UploadData::DoGetContentLength, this, result), I have to think about this ...
8 years, 10 months ago (2012-02-08 20:44:02 UTC) #10
satorux1
http://codereview.chromium.org/9321003/diff/19001/net/base/upload_data.cc File net/base/upload_data.cc (right): http://codereview.chromium.org/9321003/diff/19001/net/base/upload_data.cc#newcode176 net/base/upload_data.cc:176: base::Bind(&UploadData::DoGetContentLength, this, result), On 2012/02/08 20:44:03, willchan wrote: > ...
8 years, 10 months ago (2012-02-08 21:02:19 UTC) #11
satorux1
Uploaded a new patch with a simple change: GetContentLengthSyncHack() is removed. Instead, GetContentLengthSync() is used ...
8 years, 10 months ago (2012-02-09 00:45:47 UTC) #12
willchan no longer on Chromium
LGTM I'm willing to believe that caching is premature optimization. I'd have to think more ...
8 years, 10 months ago (2012-02-09 19:15:04 UTC) #13
satorux1
Thanks. I'll submit this for now, and rethink about the caching behavior. I'm guessing the ...
8 years, 10 months ago (2012-02-09 19:25:22 UTC) #14
satorux1
needed to get tony's approval for webkit/ changes
8 years, 10 months ago (2012-02-09 23:07:11 UTC) #15
tony
LGTM
8 years, 10 months ago (2012-02-09 23:11:50 UTC) #16
satorux1
and from jam@ for content/ changes...
8 years, 10 months ago (2012-02-09 23:13:49 UTC) #17
jam
8 years, 10 months ago (2012-02-10 00:30:11 UTC) #18
content lgtm

Powered by Google App Engine
This is Rietveld 408576698