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

Side by Side Diff: chrome_frame/urlmon_upload_data_stream.cc

Issue 9321003: net: Make UploadData::GetContentLength() asynchronous. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/urlmon_upload_data_stream.h" 5 #include "chrome_frame/urlmon_upload_data_stream.h"
6 6
7 #include "net/base/io_buffer.h" 7 #include "net/base/io_buffer.h"
8 #include "net/base/net_errors.h" 8 #include "net/base/net_errors.h"
9 9
10 void UrlmonUploadDataStream::Initialize(net::UploadData* upload_data) { 10 void UrlmonUploadDataStream::Initialize(net::UploadData* upload_data) {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 return E_POINTER; 90 return E_POINTER;
91 91
92 memset(stat_stg, 0, sizeof(STATSTG)); 92 memset(stat_stg, 0, sizeof(STATSTG));
93 if (0 == (grf_stat_flag & STATFLAG_NONAME)) { 93 if (0 == (grf_stat_flag & STATFLAG_NONAME)) {
94 const wchar_t kStreamBuffer[] = L"PostStream"; 94 const wchar_t kStreamBuffer[] = L"PostStream";
95 stat_stg->pwcsName = 95 stat_stg->pwcsName =
96 static_cast<wchar_t*>(::CoTaskMemAlloc(sizeof(kStreamBuffer))); 96 static_cast<wchar_t*>(::CoTaskMemAlloc(sizeof(kStreamBuffer)));
97 lstrcpy(stat_stg->pwcsName, kStreamBuffer); 97 lstrcpy(stat_stg->pwcsName, kStreamBuffer);
98 } 98 }
99 stat_stg->type = STGTY_STREAM; 99 stat_stg->type = STGTY_STREAM;
100 stat_stg->cbSize.QuadPart = upload_data_->GetContentLength(); 100 stat_stg->cbSize.QuadPart = upload_data_->GetContentLengthSyncHack();
101 return S_OK; 101 return S_OK;
102 } 102 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698