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

Issue 11439008: net: Change argument of URLRequest::set_upload from UploadData to UploadDataStream (Closed)

Created:
8 years ago by hashimoto
Modified:
8 years ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, jam, joi+watch-content_chromium.org, Aaron Boodman, darin-cc_chromium.org, rdsmith+dwatch_chromium.org, chromium-apps-reviews_chromium.org, droger
Base URL:
http://git.chromium.org/chromium/src.git@chunk
Visibility:
Public.

Description

net: Change argument of URLRequest::set_upload from UploadData to UploadDataStream Users of URLRequest are now responsible to create UploadDataStream. UploadOwnedBytesElementReader is moved from upload_data_stream.cc to upload_bytes_element_reader.h. BUG=156574 TEST=net_unittests and git try TBR=abodenha@chromium.org for cloud_print/service/service_state.cc Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=173318

Patch Set 1 : _ #

Total comments: 29

Patch Set 2 : Add factory functions, set_upload takes scoped_ptr #

Patch Set 3 : Change type of UploadBytesElementReader::length to uint64 #

Total comments: 4

Patch Set 4 : rebase #

Patch Set 5 : Stop using &(*data)[0], copy data in service_state.cc as a safer choice #

Patch Set 6 : Add comment about shareable file ownership #

Total comments: 3

Patch Set 7 : Add comment and DCHECK #

Patch Set 8 : rebase #

Patch Set 9 : Fix android #

Unified diffs Side-by-side diffs Delta from patch set Stats (+348 lines, -263 lines) Patch
M chrome/browser/extensions/api/web_request/web_request_api_unittest.cc View 1 2 3 2 chunks +12 lines, -6 lines 0 comments Download
M chrome/browser/net/chrome_fraudulent_certificate_reporter.cc View 1 3 chunks +8 lines, -7 lines 0 comments Download
M cloud_print/service/service_state.cc View 1 2 3 4 2 chunks +6 lines, -4 lines 0 comments Download
M content/browser/download/download_manager_impl.cc View 1 3 chunks +10 lines, -8 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 chunks +4 lines, -4 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_unittest.cc View 1 2 chunks +6 lines, -4 lines 0 comments Download
M net/base/upload_bytes_element_reader.h View 1 2 2 chunks +29 lines, -5 lines 0 comments Download
M net/base/upload_bytes_element_reader.cc View 1 2 3 4 2 chunks +17 lines, -1 line 0 comments Download
M net/base/upload_data_stream.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M net/base/upload_data_stream.cc View 1 2 chunks +8 lines, -18 lines 0 comments Download
M net/base/upload_file_element_reader.h View 1 chunk +1 line, -1 line 0 comments Download
M net/ocsp/nss_ocsp.cc View 1 2 3 4 5 6 4 chunks +11 lines, -5 lines 0 comments Download
M net/test/spawner_communicator.cc View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -4 lines 0 comments Download
M net/url_request/url_fetcher_core.cc View 1 2 3 4 5 6 7 2 chunks +6 lines, -5 lines 0 comments Download
M net/url_request/url_request.h View 1 3 chunks +3 lines, -5 lines 0 comments Download
M net/url_request/url_request.cc View 1 2 chunks +2 lines, -29 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 1 11 chunks +20 lines, -19 lines 0 comments Download
M webkit/glue/resource_request_body.h View 1 2 chunks +3 lines, -4 lines 0 comments Download
M webkit/glue/resource_request_body.cc View 1 2 3 4 5 5 chunks +54 lines, -19 lines 0 comments Download
M webkit/glue/resource_request_body_unittest.cc View 1 5 chunks +133 lines, -111 lines 0 comments Download
M webkit/tools/test_shell/simple_resource_loader_bridge.cc View 1 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
hashimoto
kinuko@: Please review src/webkit. mmenke@: Please review other parts.
8 years ago (2012-12-11 15:07:38 UTC) #1
mmenke
https://codereview.chromium.org/11439008/diff/24001/cloud_print/service/service_state.cc File cloud_print/service/service_state.cc (right): https://codereview.chromium.org/11439008/diff/24001/cloud_print/service/service_state.cc#newcode186 cloud_print/service/service_state.cc:186: request.set_upload(new net::UploadDataStream(&element_readers, 0)); Egads...this function is ugly, though suppose ...
8 years ago (2012-12-11 18:53:19 UTC) #2
kinuko
https://codereview.chromium.org/11439008/diff/24001/net/base/upload_bytes_element_reader.h File net/base/upload_bytes_element_reader.h (right): https://codereview.chromium.org/11439008/diff/24001/net/base/upload_bytes_element_reader.h#newcode16 net/base/upload_bytes_element_reader.h:16: class NET_EXPORT UploadBytesElementReader : public UploadElementReader { Can we ...
8 years ago (2012-12-12 01:19:16 UTC) #3
hashimoto
https://codereview.chromium.org/11439008/diff/24001/cloud_print/service/service_state.cc File cloud_print/service/service_state.cc (right): https://codereview.chromium.org/11439008/diff/24001/cloud_print/service/service_state.cc#newcode186 cloud_print/service/service_state.cc:186: request.set_upload(new net::UploadDataStream(&element_readers, 0)); On 2012/12/11 18:53:21, Matt Menke wrote: ...
8 years ago (2012-12-12 10:29:07 UTC) #4
mmenke
Just a couple minor comments. https://codereview.chromium.org/11439008/diff/24001/cloud_print/service/service_state.cc File cloud_print/service/service_state.cc (right): https://codereview.chromium.org/11439008/diff/24001/cloud_print/service/service_state.cc#newcode186 cloud_print/service/service_state.cc:186: request.set_upload(new net::UploadDataStream(&element_readers, 0)); On ...
8 years ago (2012-12-12 19:26:41 UTC) #5
kinuko
https://codereview.chromium.org/11439008/diff/24001/net/base/upload_bytes_element_reader.h File net/base/upload_bytes_element_reader.h (right): https://codereview.chromium.org/11439008/diff/24001/net/base/upload_bytes_element_reader.h#newcode52 net/base/upload_bytes_element_reader.h:52: std::vector<char> data_; As for the use of &(*data)[0] I ...
8 years ago (2012-12-13 00:07:55 UTC) #6
mmenke
https://codereview.chromium.org/11439008/diff/24001/net/base/upload_bytes_element_reader.h File net/base/upload_bytes_element_reader.h (right): https://codereview.chromium.org/11439008/diff/24001/net/base/upload_bytes_element_reader.h#newcode52 net/base/upload_bytes_element_reader.h:52: std::vector<char> data_; On 2012/12/13 00:07:55, kinuko wrote: > As ...
8 years ago (2012-12-13 00:43:47 UTC) #7
hashimoto
https://codereview.chromium.org/11439008/diff/24001/cloud_print/service/service_state.cc File cloud_print/service/service_state.cc (right): https://codereview.chromium.org/11439008/diff/24001/cloud_print/service/service_state.cc#newcode186 cloud_print/service/service_state.cc:186: request.set_upload(new net::UploadDataStream(&element_readers, 0)); On 2012/12/12 19:26:41, Matt Menke wrote: ...
8 years ago (2012-12-13 03:58:46 UTC) #8
kinuko
https://codereview.chromium.org/11439008/diff/43008/webkit/glue/resource_request_body.cc File webkit/glue/resource_request_body.cc (right): https://codereview.chromium.org/11439008/diff/43008/webkit/glue/resource_request_body.cc#newcode39 webkit/glue/resource_request_body.cc:39: class FileElementReader : public net::UploadFileElementReader { On 2012/12/13 03:58:47, ...
8 years ago (2012-12-13 06:05:47 UTC) #9
hashimoto
https://codereview.chromium.org/11439008/diff/43008/webkit/glue/resource_request_body.cc File webkit/glue/resource_request_body.cc (right): https://codereview.chromium.org/11439008/diff/43008/webkit/glue/resource_request_body.cc#newcode39 webkit/glue/resource_request_body.cc:39: class FileElementReader : public net::UploadFileElementReader { On 2012/12/13 06:05:47, ...
8 years ago (2012-12-13 06:17:50 UTC) #10
kinuko
webkit/ changes lgtm (though I'm not an owner)
8 years ago (2012-12-13 06:24:52 UTC) #11
mmenke
LGTM (Though I did not look at the webkit unit tests) https://codereview.chromium.org/11439008/diff/61002/net/ocsp/nss_ocsp.cc File net/ocsp/nss_ocsp.cc (right): ...
8 years ago (2012-12-13 16:44:39 UTC) #12
hashimoto
https://codereview.chromium.org/11439008/diff/61002/net/ocsp/nss_ocsp.cc File net/ocsp/nss_ocsp.cc (right): https://codereview.chromium.org/11439008/diff/61002/net/ocsp/nss_ocsp.cc#newcode422 net/ocsp/nss_ocsp.cc:422: URLRequest* request_; // The actual request this wraps On ...
8 years ago (2012-12-13 17:39:12 UTC) #13
mmenke
Still LGTM. https://codereview.chromium.org/11439008/diff/61002/net/ocsp/nss_ocsp.cc File net/ocsp/nss_ocsp.cc (right): https://codereview.chromium.org/11439008/diff/61002/net/ocsp/nss_ocsp.cc#newcode422 net/ocsp/nss_ocsp.cc:422: URLRequest* request_; // The actual request this ...
8 years ago (2012-12-13 17:42:11 UTC) #14
hashimoto
tony@, abodenha@, mpcomplete@, sky@, could you review this change as an owner of each directory? ...
8 years ago (2012-12-13 17:45:25 UTC) #15
tony
webkit LGTM
8 years ago (2012-12-13 18:12:46 UTC) #16
Matt Perry
ext lgtm
8 years ago (2012-12-13 18:28:29 UTC) #17
sky
LGTM
8 years ago (2012-12-13 20:19:20 UTC) #18
hashimoto
TBR-ing abodenha@chromium.org for cloud_print/service/service_state.cc
8 years ago (2012-12-15 02:03:20 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hashimoto@chromium.org/11439008/67001
8 years ago (2012-12-15 02:06:37 UTC) #20
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
8 years ago (2012-12-15 02:25:38 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hashimoto@chromium.org/11439008/67001
8 years ago (2012-12-15 03:51:32 UTC) #22
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
8 years ago (2012-12-15 04:01:21 UTC) #23
hashimoto
Fixed net/test/spawner_communicator.cc which is used only by android build.
8 years ago (2012-12-15 05:11:03 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hashimoto@chromium.org/11439008/60013
8 years ago (2012-12-15 05:11:25 UTC) #25
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests
8 years ago (2012-12-15 08:52:26 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hashimoto@chromium.org/11439008/60013
8 years ago (2012-12-15 18:09:34 UTC) #27
commit-bot: I haz the power
8 years ago (2012-12-15 20:28:31 UTC) #28
Message was sent while issue was closed.
Change committed as 173318

Powered by Google App Engine
This is Rietveld 408576698