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

Issue 11275223: net: Change type of UploadData::elements from std::vector to ScopedVector (Closed)

Created:
8 years, 1 month ago by hashimoto
Modified:
8 years, 1 month ago
Reviewers:
ananta, jam, mmenke, tony
CC:
chromium-reviews, Aaron Boodman, cbentzel+watch_chromium.org, darin-cc_chromium.org, chromium-apps-reviews_chromium.org
Visibility:
Public.

Description

net: Change type of UploadData::elements from std::vector to ScopedVector Using std::vector to hold UploadElement is bad for two reasons: 1. It results in a lot of unnecessary copy of uploaded data. 2. Appending new chunks may result in invalidating the pointer held by UploadBytesElementReader. BUG=160028 TEST=git try TBR=ananta@chromium.org, tony@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=167611

Patch Set 1 : _ #

Patch Set 2 : _ #

Total comments: 6

Patch Set 3 : Move ParamTraits to ipc_message_utils.h #

Total comments: 2

Patch Set 4 : rebase #

Patch Set 5 : Address comments #

Patch Set 6 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -128 lines) Patch
M chrome/browser/extensions/api/web_request/web_request_api.cc View 1 2 3 4 5 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/policy/device_management_service_browsertest.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/sessions/better_session_restore_browsertest.cc View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/common/automation_messages.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome_frame/urlmon_url_request.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ipc/ipc_message_utils.h View 1 2 3 4 2 chunks +32 lines, -0 lines 0 comments Download
M net/base/upload_data.h View 3 chunks +6 lines, -9 lines 0 comments Download
M net/base/upload_data.cc View 4 chunks +7 lines, -11 lines 0 comments Download
M net/base/upload_data_stream.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M net/base/upload_data_stream_unittest.cc View 4 chunks +4 lines, -20 lines 0 comments Download
M net/base/upload_element.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M net/http/http_network_transaction_spdy2_unittest.cc View 3 chunks +4 lines, -15 lines 0 comments Download
M net/http/http_network_transaction_spdy3_unittest.cc View 3 chunks +4 lines, -15 lines 0 comments Download
M webkit/glue/resource_request_body.cc View 1 chunk +5 lines, -5 lines 0 comments Download
M webkit/glue/resource_request_body_unittest.cc View 1 2 8 chunks +34 lines, -34 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
hashimoto
mmenke@: Please review as the main reviewer. jam@: Please review chrome/common/automation_messages.cc.
8 years, 1 month ago (2012-11-09 07:24:11 UTC) #1
mmenke
LGTM http://codereview.chromium.org/11275223/diff/10003/webkit/glue/resource_request_body_unittest.cc File webkit/glue/resource_request_body_unittest.cc (right): http://codereview.chromium.org/11275223/diff/10003/webkit/glue/resource_request_body_unittest.cc#newcode208 webkit/glue/resource_request_body_unittest.cc:208: ASSERT_EQ(upload->elements().size(), 8U); While you're here, mind flipping the ...
8 years, 1 month ago (2012-11-09 15:50:19 UTC) #2
jam
https://codereview.chromium.org/11275223/diff/10003/chrome/common/automation_messages.cc File chrome/common/automation_messages.cc (right): https://codereview.chromium.org/11275223/diff/10003/chrome/common/automation_messages.cc#newcode225 chrome/common/automation_messages.cc:225: struct ParamTraits<ScopedVector<net::UploadElement> > { can you add a param ...
8 years, 1 month ago (2012-11-09 17:38:48 UTC) #3
hashimoto
Move the param traits to ipc_message_utils.h and added DISALLOW_COPY_AND_ASSIGN to UploadElement. PTAL http://codereview.chromium.org/11275223/diff/10003/chrome/common/automation_messages.cc File chrome/common/automation_messages.cc ...
8 years, 1 month ago (2012-11-10 09:34:52 UTC) #4
jam
http://codereview.chromium.org/11275223/diff/10003/chrome/common/automation_messages.cc File chrome/common/automation_messages.cc (right): http://codereview.chromium.org/11275223/diff/10003/chrome/common/automation_messages.cc#newcode225 chrome/common/automation_messages.cc:225: struct ParamTraits<ScopedVector<net::UploadElement> > { On 2012/11/10 09:34:52, hashimoto wrote: ...
8 years, 1 month ago (2012-11-12 20:58:54 UTC) #5
hashimoto
http://codereview.chromium.org/11275223/diff/10003/chrome/common/automation_messages.cc File chrome/common/automation_messages.cc (right): http://codereview.chromium.org/11275223/diff/10003/chrome/common/automation_messages.cc#newcode225 chrome/common/automation_messages.cc:225: struct ParamTraits<ScopedVector<net::UploadElement> > { On 2012/11/12 20:58:54, John Abd-El-Malek ...
8 years, 1 month ago (2012-11-13 05:03:51 UTC) #6
jam
lgtm
8 years, 1 month ago (2012-11-13 16:09:23 UTC) #7
hashimoto
TBR-ing ananta@ for src/chrome_frame, tony@ for src/webkit/glue
8 years, 1 month ago (2012-11-14 02:26:18 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hashimoto@chromium.org/11275223/21
8 years, 1 month ago (2012-11-14 02:29:31 UTC) #9
commit-bot: I haz the power
8 years, 1 month ago (2012-11-14 06:35:55 UTC) #10
Change committed as 167611

Powered by Google App Engine
This is Rietveld 408576698