summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-14 06:35:52 +0000
committerhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-14 06:35:52 +0000
commitb1064d692d5f1d56877d0b1eb0b38920115227ba (patch)
tree6145df9c1a9d94bf5879cbdbf03cb9fcab4211c7 /chrome_frame
parentca0206c7aba32aa151c94514a0456a6c58252fb5 (diff)
downloadchromium_src-b1064d692d5f1d56877d0b1eb0b38920115227ba.zip
chromium_src-b1064d692d5f1d56877d0b1eb0b38920115227ba.tar.gz
chromium_src-b1064d692d5f1d56877d0b1eb0b38920115227ba.tar.bz2
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 Review URL: https://chromiumcodereview.appspot.com/11275223 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167611 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/urlmon_url_request.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome_frame/urlmon_url_request.cc b/chrome_frame/urlmon_url_request.cc
index 6d33e551..c5a0a25 100644
--- a/chrome_frame/urlmon_url_request.cc
+++ b/chrome_frame/urlmon_url_request.cc
@@ -1078,10 +1078,10 @@ void UrlmonUrlRequestManager::StartRequestHelper(
// Format upload data if it's chunked.
if (request_info.upload_data && request_info.upload_data->is_chunked()) {
- std::vector<net::UploadElement>* elements =
+ ScopedVector<net::UploadElement>* elements =
request_info.upload_data->elements_mutable();
for (size_t i = 0; i < elements->size(); ++i) {
- net::UploadElement* element = &(*elements)[i];
+ net::UploadElement* element = (*elements)[i];
DCHECK(element->type() == net::UploadElement::TYPE_BYTES);
std::string chunk_length = StringPrintf(
"%X\r\n", static_cast<unsigned int>(element->bytes_length()));