OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include "chrome_frame/np_browser_functions.h" | 8 #include "chrome_frame/np_browser_functions.h" |
9 | 9 |
10 PluginUrlRequest::PluginUrlRequest() | 10 PluginUrlRequest::PluginUrlRequest() |
11 : delegate_(NULL), | 11 : delegate_(NULL), |
12 remote_request_id_(-1), | 12 remote_request_id_(-1), |
13 post_data_len_(0), | 13 post_data_len_(0), |
14 enable_frame_busting_(false), | 14 enable_frame_busting_(false), |
15 resource_type_(ResourceType::MAIN_FRAME), | 15 resource_type_(ResourceType::MAIN_FRAME), |
16 load_flags_(0) { | 16 load_flags_(0), |
| 17 is_chunked_upload_(false) { |
17 } | 18 } |
18 | 19 |
19 PluginUrlRequest::~PluginUrlRequest() { | 20 PluginUrlRequest::~PluginUrlRequest() { |
20 } | 21 } |
21 | 22 |
22 bool PluginUrlRequest::Initialize(PluginUrlRequestDelegate* delegate, | 23 bool PluginUrlRequest::Initialize(PluginUrlRequestDelegate* delegate, |
23 int remote_request_id, const std::string& url, const std::string& method, | 24 int remote_request_id, const std::string& url, const std::string& method, |
24 const std::string& referrer, const std::string& extra_headers, | 25 const std::string& referrer, const std::string& extra_headers, |
25 net::UploadData* upload_data, ResourceType::Type resource_type, | 26 net::UploadData* upload_data, ResourceType::Type resource_type, |
26 bool enable_frame_busting, int load_flags) { | 27 bool enable_frame_busting, int load_flags) { |
(...skipping 13 matching lines...) Expand all Loading... |
40 CComObject<UrlmonUploadDataStream>* upload_stream = NULL; | 41 CComObject<UrlmonUploadDataStream>* upload_stream = NULL; |
41 HRESULT hr = CComObject<UrlmonUploadDataStream>::CreateInstance( | 42 HRESULT hr = CComObject<UrlmonUploadDataStream>::CreateInstance( |
42 &upload_stream); | 43 &upload_stream); |
43 if (FAILED(hr)) { | 44 if (FAILED(hr)) { |
44 NOTREACHED(); | 45 NOTREACHED(); |
45 } else { | 46 } else { |
46 post_data_len_ = upload_data->GetContentLength(); | 47 post_data_len_ = upload_data->GetContentLength(); |
47 upload_stream->AddRef(); | 48 upload_stream->AddRef(); |
48 upload_stream->Initialize(upload_data); | 49 upload_stream->Initialize(upload_data); |
49 upload_data_.Attach(upload_stream); | 50 upload_data_.Attach(upload_stream); |
| 51 is_chunked_upload_ = upload_data->is_chunked(); |
50 } | 52 } |
51 } | 53 } |
52 | 54 |
53 enable_frame_busting_ = enable_frame_busting; | 55 enable_frame_busting_ = enable_frame_busting; |
54 | 56 |
55 return true; | 57 return true; |
56 } | 58 } |
OLD | NEW |