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

Side by Side Diff: chrome_frame/plugin_url_request.cc

Issue 9321003: net: Make UploadData::GetContentLength() asynchronous. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome_frame/urlmon_upload_data_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome_frame/plugin_url_request.h" 5 #include "chrome_frame/plugin_url_request.h"
6 6
7 #include "chrome/common/automation_messages.h" 7 #include "chrome/common/automation_messages.h"
8 8
9 PluginUrlRequest::PluginUrlRequest() 9 PluginUrlRequest::PluginUrlRequest()
10 : delegate_(NULL), 10 : delegate_(NULL),
(...skipping 25 matching lines...) Expand all
36 if (upload_data) { 36 if (upload_data) {
37 // We store a pointer to UrlmonUploadDataStream and not net::UploadData 37 // We store a pointer to UrlmonUploadDataStream and not net::UploadData
38 // since UrlmonUploadDataStream implements thread safe ref counting and 38 // since UrlmonUploadDataStream implements thread safe ref counting and
39 // UploadData does not. 39 // UploadData does not.
40 CComObject<UrlmonUploadDataStream>* upload_stream = NULL; 40 CComObject<UrlmonUploadDataStream>* upload_stream = NULL;
41 HRESULT hr = CComObject<UrlmonUploadDataStream>::CreateInstance( 41 HRESULT hr = CComObject<UrlmonUploadDataStream>::CreateInstance(
42 &upload_stream); 42 &upload_stream);
43 if (FAILED(hr)) { 43 if (FAILED(hr)) {
44 NOTREACHED(); 44 NOTREACHED();
45 } else { 45 } else {
46 post_data_len_ = upload_data->GetContentLength(); 46 post_data_len_ = upload_data->GetContentLengthSync();
47 upload_stream->AddRef(); 47 upload_stream->AddRef();
48 upload_stream->Initialize(upload_data); 48 upload_stream->Initialize(upload_data);
49 upload_data_.Attach(upload_stream); 49 upload_data_.Attach(upload_stream);
50 is_chunked_upload_ = upload_data->is_chunked(); 50 is_chunked_upload_ = upload_data->is_chunked();
51 } 51 }
52 } 52 }
53 53
54 enable_frame_busting_ = enable_frame_busting; 54 enable_frame_busting_ = enable_frame_busting;
55 55
56 return true; 56 return true;
57 } 57 }
OLDNEW
« no previous file with comments | « no previous file | chrome_frame/urlmon_upload_data_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698