OLD | NEW |
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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 return E_POINTER; | 89 return E_POINTER; |
90 | 90 |
91 memset(stat_stg, 0, sizeof(STATSTG)); | 91 memset(stat_stg, 0, sizeof(STATSTG)); |
92 if (0 == (grf_stat_flag & STATFLAG_NONAME)) { | 92 if (0 == (grf_stat_flag & STATFLAG_NONAME)) { |
93 const wchar_t kStreamBuffer[] = L"PostStream"; | 93 const wchar_t kStreamBuffer[] = L"PostStream"; |
94 stat_stg->pwcsName = | 94 stat_stg->pwcsName = |
95 static_cast<wchar_t*>(::CoTaskMemAlloc(sizeof(kStreamBuffer))); | 95 static_cast<wchar_t*>(::CoTaskMemAlloc(sizeof(kStreamBuffer))); |
96 lstrcpy(stat_stg->pwcsName, kStreamBuffer); | 96 lstrcpy(stat_stg->pwcsName, kStreamBuffer); |
97 } | 97 } |
98 stat_stg->type = STGTY_STREAM; | 98 stat_stg->type = STGTY_STREAM; |
99 stat_stg->cbSize.QuadPart = upload_data_->GetContentLengthSync(); | 99 stat_stg->cbSize.QuadPart = request_body_stream_->size(); |
100 return S_OK; | 100 return S_OK; |
101 } | 101 } |
OLD | NEW |