diff options
author | hashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-17 10:15:17 +0000 |
---|---|---|
committer | hashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-17 10:15:17 +0000 |
commit | 5b76814bebad53ca9e1adab0ae5cc36f351ace42 (patch) | |
tree | df7731e315de587515a487638e8f9a6d0946682a /chrome_frame | |
parent | 9b5dc52f6ae610f987a2989a8bbf006143870b24 (diff) | |
download | chromium_src-5b76814bebad53ca9e1adab0ae5cc36f351ace42.zip chromium_src-5b76814bebad53ca9e1adab0ae5cc36f351ace42.tar.gz chromium_src-5b76814bebad53ca9e1adab0ae5cc36f351ace42.tar.bz2 |
net: Make UploadDataStream::Read() asynchronous
Rename existing Read() to ReadSync()
Change type of |buf| from char* to scoped_refptr<IOBuffer> so that async operation is always performed safely
Add an asynchronous implementation, Read()
The newly added Read() is not used yet, all users still use the old version ReadSync()
BUG=72001
TEST=net_unittests
Review URL: https://chromiumcodereview.appspot.com/10910268
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162343 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/urlmon_upload_data_stream.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome_frame/urlmon_upload_data_stream.cc b/chrome_frame/urlmon_upload_data_stream.cc index 8aae0df7..05a2b14 100644 --- a/chrome_frame/urlmon_upload_data_stream.cc +++ b/chrome_frame/urlmon_upload_data_stream.cc @@ -41,7 +41,7 @@ STDMETHODIMP UrlmonUploadDataStream::Read(void* pv, ULONG cb, ULONG* read) { scoped_refptr<net::IOBufferWithSize> buf( new net::IOBufferWithSize(bytes_to_copy_now)); - int bytes_read = request_body_stream_->Read(buf, buf->size()); + int bytes_read = request_body_stream_->ReadSync(buf, buf->size()); if (bytes_read == 0) // Reached the end of the stream. break; |