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

Issue 11419034: net: Move ownership of UploadDataStream from URLRequestHttpJob to URLRequest (Closed)

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

Description

net: Move ownership of UploadDataStream from URLRequestHttpJob to URLRequest URLRequest creates and owns UploadDataStream. URLRequest::get_upload_mutable and URLRequest::AppendBytesToUpload are removed because they can modify UploadData after UploadDataStream is created. Return type of URLRequest::get_upload is changed from UploadData to UploadDataStream. A number of methods are added to UploadElementReader and its subclasses to support URLRequestAutomationJob and some other users. BUG=156574 TEST=git try TBR=jam@chromium.org (for chrome/browser/automation, already reviewed by ananta@chromium.org) Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=170028

Patch Set 1 : _ #

Patch Set 2 : Fix Chrome Frame #

Patch Set 3 : Fix ASAN #

Total comments: 6

Patch Set 4 : rebase #

Patch Set 5 : Address comments #

Total comments: 2

Patch Set 6 : Remove discard_upload #

Patch Set 7 : rebase #

Patch Set 8 : rebase #

Total comments: 2

Patch Set 9 : Move UploadData creation code to a function #

Total comments: 2

Patch Set 10 : Remove a local variable #

Unified diffs Side-by-side diffs Delta from patch set Stats (+194 lines, -111 lines) Patch
M chrome/browser/automation/url_request_automation_job.cc View 1 2 3 4 5 6 7 8 9 4 chunks +40 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/web_request/upload_data_presenter.h View 1 2 3 4 5 chunks +11 lines, -11 lines 0 comments Download
M chrome/browser/extensions/api/web_request/upload_data_presenter.cc View 3 chunks +17 lines, -14 lines 0 comments Download
M chrome/browser/extensions/api/web_request/upload_data_presenter_unittest.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/web_request/web_request_api.cc View 1 2 3 4 5 6 7 3 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/extensions/api/web_request/web_request_api_unittest.cc View 1 2 3 4 5 6 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/browser/net/chrome_fraudulent_certificate_reporter.cc View 3 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/policy/device_management_service_browsertest.cc View 2 chunks +9 lines, -5 lines 0 comments Download
M chrome/browser/sessions/better_session_restore_browsertest.cc View 1 2 3 4 5 6 7 2 chunks +10 lines, -7 lines 0 comments Download
M net/base/upload_bytes_element_reader.h View 2 chunks +6 lines, -2 lines 0 comments Download
M net/base/upload_bytes_element_reader.cc View 2 chunks +9 lines, -4 lines 0 comments Download
M net/base/upload_data_stream.h View 1 chunk +4 lines, -0 lines 0 comments Download
M net/base/upload_element_reader.h View 2 chunks +10 lines, -0 lines 0 comments Download
M net/base/upload_element_reader.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M net/base/upload_file_element_reader.h View 1 chunk +8 lines, -0 lines 0 comments Download
M net/base/upload_file_element_reader.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M net/ocsp/nss_ocsp.cc View 2 chunks +5 lines, -2 lines 0 comments Download
M net/test/spawner_communicator.cc View 2 chunks +4 lines, -1 line 0 comments Download
M net/url_request/url_fetcher_core.cc View 2 chunks +5 lines, -2 lines 0 comments Download
M net/url_request/url_request.h View 3 4 4 chunks +3 lines, -12 lines 0 comments Download
M net/url_request/url_request.cc View 1 2 3 4 5 7 chunks +13 lines, -22 lines 0 comments Download
M net/url_request/url_request_http_job.h View 2 chunks +1 line, -3 lines 0 comments Download
M net/url_request/url_request_http_job.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -4 lines 0 comments Download
M net/url_request/url_request_job.h View 2 chunks +2 lines, -2 lines 0 comments Download
M net/url_request/url_request_job.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/url_request/url_request_unittest.cc View 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 23 (0 generated)
hashimoto
Please review. This patch is a temporary step before changing URLRequest::set_upload argument type to scoped_ptr<UploadDataStream>.
8 years, 1 month ago (2012-11-16 11:42:55 UTC) #1
mmenke
Looks good, just wondering about |disable_upload_| Think the necessity of AsBytesReader() / AsFileReader() is a ...
8 years, 1 month ago (2012-11-19 17:21:20 UTC) #2
hashimoto
On 2012/11/19 17:21:20, Matt Menke wrote: > Looks good, just wondering about |disable_upload_| > > ...
8 years, 1 month ago (2012-11-20 07:47:45 UTC) #3
hashimoto
New patch set. PTAL http://codereview.chromium.org/11419034/diff/33/chrome/browser/extensions/api/web_request/upload_data_presenter.h File chrome/browser/extensions/api/web_request/upload_data_presenter.h (right): http://codereview.chromium.org/11419034/diff/33/chrome/browser/extensions/api/web_request/upload_data_presenter.h#newcode93 chrome/browser/extensions/api/web_request/upload_data_presenter.h:93: // content of such elements. ...
8 years, 1 month ago (2012-11-20 07:48:46 UTC) #4
mmenke
LGTM https://codereview.chromium.org/11419034/diff/34/net/url_request/url_request.cc File net/url_request/url_request.cc (right): https://codereview.chromium.org/11419034/diff/34/net/url_request/url_request.cc#newcode802 net/url_request/url_request.cc:802: final_upload_progress_ = job_->GetUploadProgress(); Can't we just move this ...
8 years, 1 month ago (2012-11-20 19:57:03 UTC) #5
hashimoto
https://codereview.chromium.org/11419034/diff/34/net/url_request/url_request.cc File net/url_request/url_request.cc (right): https://codereview.chromium.org/11419034/diff/34/net/url_request/url_request.cc#newcode802 net/url_request/url_request.cc:802: final_upload_progress_ = job_->GetUploadProgress(); On 2012/11/20 19:57:03, Matt Menke wrote: ...
8 years, 1 month ago (2012-11-21 03:41:02 UTC) #6
hashimoto
jam@, mpcomplete@, mnissler@, marja@, Please review as an owner of each directry. jam: chrome/browser/automation/url_request_automation_job.cc mpcomplete: ...
8 years, 1 month ago (2012-11-21 03:55:08 UTC) #7
Mattias Nissler (ping if slow)
LGTM for chrome/browser/policy
8 years, 1 month ago (2012-11-21 09:41:46 UTC) #8
marja
chrome/browser/sessions/better_session_restore_browsertest.cc LGTM
8 years, 1 month ago (2012-11-21 09:51:48 UTC) #9
jam
owner rubberstamp (I'll defer to other reviewers for checking that the conversion is right)
8 years, 1 month ago (2012-11-21 19:26:47 UTC) #10
hashimoto
ananta@, mpcomplete@, Please review as an owner of each directry. ananta: chrome/browser/automation/url_request_automation_job.cc (on behalf of ...
8 years ago (2012-11-26 06:32:31 UTC) #11
Matt Perry
extensions lgtm
8 years ago (2012-11-26 22:15:53 UTC) #12
hashimoto
ananta@, Please review this change as an owner of chrome/browser/automation/url_request_automation_job.cc (on behalf of jam)
8 years ago (2012-11-27 11:22:21 UTC) #13
hashimoto
Pawel, could you review this change as an owner of chrome/browser/automation?
8 years ago (2012-11-28 00:57:58 UTC) #14
ananta
https://codereview.chromium.org/11419034/diff/8041/chrome/browser/automation/url_request_automation_job.cc File chrome/browser/automation/url_request_automation_job.cc (right): https://codereview.chromium.org/11419034/diff/8041/chrome/browser/automation/url_request_automation_job.cc#newcode470 chrome/browser/automation/url_request_automation_job.cc:470: const net::UploadDataStream* upload_data_stream = request_->get_upload(); This code seems generic ...
8 years ago (2012-11-28 02:21:18 UTC) #15
hashimoto
https://codereview.chromium.org/11419034/diff/8041/chrome/browser/automation/url_request_automation_job.cc File chrome/browser/automation/url_request_automation_job.cc (right): https://codereview.chromium.org/11419034/diff/8041/chrome/browser/automation/url_request_automation_job.cc#newcode470 chrome/browser/automation/url_request_automation_job.cc:470: const net::UploadDataStream* upload_data_stream = request_->get_upload(); On 2012/11/28 02:21:18, ananta ...
8 years ago (2012-11-28 02:34:05 UTC) #16
ananta
LGTM https://codereview.chromium.org/11419034/diff/3102/chrome/browser/automation/url_request_automation_job.cc File chrome/browser/automation/url_request_automation_job.cc (right): https://codereview.chromium.org/11419034/diff/3102/chrome/browser/automation/url_request_automation_job.cc#newcode500 chrome/browser/automation/url_request_automation_job.cc:500: const net::UploadDataStream* upload_data_stream = request_->get_upload(); We can nuke ...
8 years ago (2012-11-28 05:29:36 UTC) #17
hashimoto
https://codereview.chromium.org/11419034/diff/3102/chrome/browser/automation/url_request_automation_job.cc File chrome/browser/automation/url_request_automation_job.cc (right): https://codereview.chromium.org/11419034/diff/3102/chrome/browser/automation/url_request_automation_job.cc#newcode500 chrome/browser/automation/url_request_automation_job.cc:500: const net::UploadDataStream* upload_data_stream = request_->get_upload(); On 2012/11/28 05:29:37, ananta ...
8 years ago (2012-11-28 05:54:01 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hashimoto@chromium.org/11419034/11047
8 years ago (2012-11-28 09:09:05 UTC) #19
commit-bot: I haz the power
Presubmit check for 11419034-11047 failed and returned exit status 1. Running presubmit commit checks ...
8 years ago (2012-11-28 09:09:21 UTC) #20
hashimoto
TBR-ing jam@ for chrome/browser/automation since it's already reviewed by ananta@
8 years ago (2012-11-28 16:07: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/11419034/11047
8 years ago (2012-11-28 16:08:28 UTC) #22
commit-bot: I haz the power
8 years ago (2012-11-28 19:50:44 UTC) #23
Message was sent while issue was closed.
Change committed as 170028

Powered by Google App Engine
This is Rietveld 408576698