summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorsatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-02 08:59:16 +0000
committersatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-02 08:59:16 +0000
commit49ed6cc5209c5fb18cf1286174b80d52f67f563e (patch)
tree5e2c884ec2c40a038b648a80d0b08e850a690edf /chrome_frame
parentb5088d08be50175ac759d868de91da16a634a323 (diff)
downloadchromium_src-49ed6cc5209c5fb18cf1286174b80d52f67f563e.zip
chromium_src-49ed6cc5209c5fb18cf1286174b80d52f67f563e.tar.gz
chromium_src-49ed6cc5209c5fb18cf1286174b80d52f67f563e.tar.bz2
net: Replace UploadDataStream::Create() with Init().
This is in preparation of adding asynchronous API to UploadDataStream. Doing initialization in Init() is cleaner anyway. BUG=72001 TEST=try bots Review URL: http://codereview.chromium.org/9235079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120182 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/urlmon_upload_data_stream.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/chrome_frame/urlmon_upload_data_stream.cc b/chrome_frame/urlmon_upload_data_stream.cc
index 0f9dc84..3673a21 100644
--- a/chrome_frame/urlmon_upload_data_stream.cc
+++ b/chrome_frame/urlmon_upload_data_stream.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -9,8 +9,10 @@
void UrlmonUploadDataStream::Initialize(net::UploadData* upload_data) {
upload_data_ = upload_data;
- request_body_stream_.reset(net::UploadDataStream::Create(upload_data, NULL));
- DCHECK(request_body_stream_.get());
+ request_body_stream_.reset(
+ new net::UploadDataStream(upload_data));
+ const int result = request_body_stream_->Init();
+ DCHECK_EQ(net::OK, result);
}
STDMETHODIMP UrlmonUploadDataStream::Read(void* pv, ULONG cb, ULONG* read) {
@@ -68,9 +70,9 @@ STDMETHODIMP UrlmonUploadDataStream::Seek(LARGE_INTEGER move, DWORD origin,
// STREAM_SEEK_SETs to work with a 0 offset, but fail on everything else.
if (origin == STREAM_SEEK_SET && move.QuadPart == 0) {
if (request_body_stream_->position() != 0) {
- request_body_stream_.reset(
- net::UploadDataStream::Create(upload_data_, NULL));
- DCHECK(request_body_stream_.get());
+ request_body_stream_.reset(new net::UploadDataStream(upload_data_));
+ const int result = request_body_stream_->Init();
+ DCHECK_EQ(net::OK, result);
}
if (new_pos) {
new_pos->QuadPart = 0;