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

Issue 594036: Support sending a sliced file in chromium.... (Closed)

Created:
10 years, 10 months ago by jianli
Modified:
9 years, 6 months ago
CC:
chromium-reviews, brettw+cc_chromium.org, darin+cc_chromium.org, dpranke+watch_chromium.org, ben+cc_chromium.org, amit, pam+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Support sending a sliced file in chromium. BUG=none TEST=The WebKit Layout test. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=42559

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 14

Patch Set 3 : '' #

Total comments: 4

Patch Set 4 : '' #

Total comments: 16

Patch Set 5 : '' #

Total comments: 25

Patch Set 6 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+324 lines, -66 lines) Patch
M build/features_override.gypi View 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chrome_plugin_host.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/resource_message_filter.h View 1 2 3 4 3 chunks +10 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/resource_message_filter.cc View 1 2 3 4 5 3 chunks +44 lines, -8 lines 0 comments Download
M chrome/common/common_param_traits.h View 1 2 3 4 2 chunks +6 lines, -1 line 0 comments Download
M chrome/common/render_messages_internal.h View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/common/resource_dispatcher.cc View 1 2 3 4 2 chunks +9 lines, -4 lines 0 comments Download
M chrome/plugin/chrome_plugin_host.cc View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/renderer/renderer_webkitclient_impl.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/renderer/renderer_webkitclient_impl.cc View 1 2 3 4 1 chunk +15 lines, -0 lines 0 comments Download
M chrome/renderer/translate/page_translator_unittest.cc View 1 2 3 4 1 chunk +5 lines, -2 lines 0 comments Download
M chrome_frame/urlmon_upload_data_stream.cc View 1 2 3 4 5 2 chunks +6 lines, -2 lines 0 comments Download
M net/base/net_error_list.h View 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M net/base/upload_data.h View 1 2 3 4 5 5 chunks +17 lines, -4 lines 0 comments Download
M net/base/upload_data_stream.h View 1 2 3 4 5 2 chunks +11 lines, -2 lines 0 comments Download
M net/base/upload_data_stream.cc View 1 2 3 4 5 5 chunks +28 lines, -2 lines 0 comments Download
M net/base/upload_data_stream_unittest.cc View 1 2 3 4 5 3 chunks +62 lines, -11 lines 0 comments Download
M net/http/http_network_transaction.cc View 1 2 3 4 2 chunks +13 lines, -4 lines 0 comments Download
M net/spdy/spdy_network_transaction.cc View 1 2 3 4 1 chunk +7 lines, -2 lines 0 comments Download
M net/url_request/url_request.h View 1 2 3 4 5 1 chunk +7 lines, -3 lines 0 comments Download
M net/url_request/url_request.cc View 1 2 3 4 1 chunk +7 lines, -3 lines 0 comments Download
M webkit/glue/glue_serialize.cc View 1 2 3 4 4 chunks +16 lines, -2 lines 0 comments Download
M webkit/glue/glue_serialize_unittest.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M webkit/glue/mock_resource_loader_bridge.h View 1 2 3 4 1 chunk +5 lines, -3 lines 0 comments Download
M webkit/glue/resource_loader_bridge.h View 1 2 3 4 1 chunk +6 lines, -3 lines 0 comments Download
M webkit/glue/webkitclient_impl.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M webkit/glue/webkitclient_impl.cc View 3 4 1 chunk +1 line, -1 line 0 comments Download
M webkit/glue/weburlloader_impl.cc View 1 2 3 4 1 chunk +10 lines, -1 line 0 comments Download
M webkit/tools/test_shell/simple_resource_loader_bridge.cc View 1 2 3 4 1 chunk +7 lines, -3 lines 0 comments Download
M webkit/tools/test_shell/test_shell_webkit_init.h View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
jianli
10 years, 10 months ago (2010-02-11 01:44:20 UTC) #1
darin (slow to review)
http://codereview.chromium.org/594036/diff/4001/4021 File chrome/browser/renderer_host/resource_message_filter.cc (right): http://codereview.chromium.org/594036/diff/4001/4021#newcode1326 chrome/browser/renderer_host/resource_message_filter.cc:1326: if (file_util::GetFileInfo(path, &info)) file_util::FileInfo contains both size and last_modified ...
10 years, 10 months ago (2010-02-12 21:54:26 UTC) #2
jianli
http://codereview.chromium.org/594036/diff/4001/4021 File chrome/browser/renderer_host/resource_message_filter.cc (right): http://codereview.chromium.org/594036/diff/4001/4021#newcode1326 chrome/browser/renderer_host/resource_message_filter.cc:1326: if (file_util::GetFileInfo(path, &info)) On 2010/02/12 21:54:26, darin wrote: > ...
10 years, 9 months ago (2010-03-02 19:28:39 UTC) #3
darin (slow to review)
http://codereview.chromium.org/594036/diff/6001/6012 File net/base/upload_data_stream.cc (right): http://codereview.chromium.org/594036/diff/6001/6012#newcode33 net/base/upload_data_stream.cc:33: success_(false) { i never see success_ getting set to ...
10 years, 9 months ago (2010-03-05 09:07:33 UTC) #4
jianli
http://codereview.chromium.org/594036/diff/6001/6012 File net/base/upload_data_stream.cc (right): http://codereview.chromium.org/594036/diff/6001/6012#newcode33 net/base/upload_data_stream.cc:33: success_(false) { On 2010/03/05 09:07:33, darin wrote: > i ...
10 years, 9 months ago (2010-03-19 23:14:43 UTC) #5
darin (slow to review)
I've asked Eric Roman to also review the net/ changes.
10 years, 9 months ago (2010-03-23 18:17:52 UTC) #6
darin (slow to review)
http://codereview.chromium.org/594036/diff/9001/10020 File chrome/browser/renderer_host/resource_message_filter.cc (right): http://codereview.chromium.org/594036/diff/9001/10020#newcode1307 chrome/browser/renderer_host/resource_message_filter.cc:1307: void WriteFileSize(IPC::Message* reply_msg, this function should be moved up ...
10 years, 9 months ago (2010-03-23 19:53:01 UTC) #7
jianli
http://codereview.chromium.org/594036/diff/9001/10020 File chrome/browser/renderer_host/resource_message_filter.cc (right): http://codereview.chromium.org/594036/diff/9001/10020#newcode1307 chrome/browser/renderer_host/resource_message_filter.cc:1307: void WriteFileSize(IPC::Message* reply_msg, On 2010/03/23 19:53:02, darin wrote: > ...
10 years, 9 months ago (2010-03-24 01:28:14 UTC) #8
darin (slow to review)
LGTM, but I would still like Eric Roman to sign off on the net/ changes. ...
10 years, 9 months ago (2010-03-24 18:12:15 UTC) #9
eroman
Can you upload the latest patch? I don't see some of the changes described in ...
10 years, 9 months ago (2010-03-24 18:47:47 UTC) #10
eroman
> Support sending a sliced file in chromium. Can you be a bit more verbose ...
10 years, 9 months ago (2010-03-24 20:56:04 UTC) #11
jianli
http://codereview.chromium.org/594036/diff/38001/39020 File chrome/browser/renderer_host/resource_message_filter.cc (right): http://codereview.chromium.org/594036/diff/38001/39020#newcode1349 chrome/browser/renderer_host/resource_message_filter.cc:1349: // Getting file modification time could take long time ...
10 years, 9 months ago (2010-03-24 22:42:27 UTC) #12
eroman
Thanks for making those changes. LGTM. The only other thing I wanted to bring up, ...
10 years, 9 months ago (2010-03-24 22:56:23 UTC) #13
jianli
Yes, thanks for reminding this. I think this is only the very edge case with ...
10 years, 9 months ago (2010-03-25 00:45:57 UTC) #14
darin (slow to review)
10 years, 9 months ago (2010-03-25 02:57:20 UTC) #15
That is the edge case I was hoping to avoid by leveraging agl's patch, but
he was never able to get that one to stick due to some obscure errors on the
bots.

-Darin



On Wed, Mar 24, 2010 at 5:45 PM, Jian Li <jianli@chromium.org> wrote:

> Yes, thanks for reminding this. I think this is only the very edge case
> with which we can tolerate. We do not want to be 100% bullet proof by making
> things too complicated.
>
>
> On Wed, Mar 24, 2010 at 3:56 PM, <eroman@chromium.org> wrote:
>
>> Thanks for making those changes. LGTM.
>>
>> The only other thing I wanted to bring up, is the slight race between when
>> we
>> test the file's modification time, and when we read from it.
>>
>> It looks like it is possible for us to test the modification time, it
>> passes,
>> and then the file changes, and then we upload it.
>>
>>
>>
>> http://codereview.chromium.org/594036/diff/38001/39014
>> File net/base/upload_data_stream.h (right):
>>
>> http://codereview.chromium.org/594036/diff/38001/39014#newcode20
>> net/base/upload_data_stream.h:20: static UploadDataStream* Create(const
>> UploadData* data, int* error_code);
>> On 2010/03/24 22:42:27, jianli wrote:
>>
>>> On 2010/03/24 20:56:05, eroman wrote:
>>> > Typically in the network module we make the error code be the return
>>>
>> parameter
>>
>>> > for functions, rather than an out parameter.
>>> >
>>> > I suggest re-ordering this, such that the |UploadDataStream*| is an
>>>
>> output
>>
>>> > parameter. And similarly changing the contract so the out
>>>
>> |UploadDataStream*|
>>
>>> is
>>> > only valid when return value != OK.
>>>
>>
>>  I've thought about this first when I introduced the creator. The
>>>
>> reason I choose
>>
>>> the other alternative is to accommodate the caller code. If I define
>>>
>> the creator
>>
>>> as: static int Create(const UploadData* data, UploadDataStream**
>>>
>> stream), we
>>
>>> will have to change the following calling code from:
>>>
>>
>> request_body_stream_.reset(net::UploadDataStream::Create(upload_data,
>> NULL));
>>
>>> to:
>>>   UploadDataStream* stream = NULL;
>>>   net::UploadDataStream::Create(upload_data, &stream);
>>>   request_body_stream_.reset(stream);
>>>
>>
>>  This is because the scoped_ptr does not have any method to get the
>>>
>> address of
>>
>>> the underlying pointer.
>>>
>>
>>  How do you think? I can change it if you feel strongly about this.
>>>
>>
>> I see. Well I'll leave it up to your preference then. One way would be
>> to make the out parameter a scoped_ptr*.
>>
>>
>> http://codereview.chromium.org/594036
>>
>
>

Powered by Google App Engine
This is Rietveld 408576698