| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/child/npapi/plugin_url_fetcher.h" | 5 #include "content/child/npapi/plugin_url_fetcher.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "content/child/child_thread.h" | 8 #include "content/child/child_thread.h" |
| 9 #include "content/child/multipart_response_delegate.h" | 9 #include "content/child/multipart_response_delegate.h" |
| 10 #include "content/child/npapi/plugin_host.h" | 10 #include "content/child/npapi/plugin_host.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 copy_stream_data_(copy_stream_data), | 106 copy_stream_data_(copy_stream_data), |
| 107 data_offset_(0), | 107 data_offset_(0), |
| 108 pending_failure_notification_(false) { | 108 pending_failure_notification_(false) { |
| 109 RequestInfo request_info; | 109 RequestInfo request_info; |
| 110 request_info.method = method; | 110 request_info.method = method; |
| 111 request_info.url = url; | 111 request_info.url = url; |
| 112 request_info.first_party_for_cookies = first_party_for_cookies; | 112 request_info.first_party_for_cookies = first_party_for_cookies; |
| 113 request_info.referrer = referrer; | 113 request_info.referrer = referrer; |
| 114 request_info.load_flags = net::LOAD_NORMAL; | 114 request_info.load_flags = net::LOAD_NORMAL; |
| 115 request_info.requestor_pid = origin_pid; | 115 request_info.requestor_pid = origin_pid; |
| 116 request_info.request_type = ResourceType::OBJECT; | 116 request_info.request_type = RESOURCE_TYPE_OBJECT; |
| 117 request_info.routing_id = render_view_id; | 117 request_info.routing_id = render_view_id; |
| 118 | 118 |
| 119 RequestExtraData extra_data; | 119 RequestExtraData extra_data; |
| 120 extra_data.set_render_frame_id(render_frame_id); | 120 extra_data.set_render_frame_id(render_frame_id); |
| 121 extra_data.set_is_main_frame(false); | 121 extra_data.set_is_main_frame(false); |
| 122 request_info.extra_data = &extra_data; | 122 request_info.extra_data = &extra_data; |
| 123 | 123 |
| 124 std::vector<char> body; | 124 std::vector<char> body; |
| 125 if (method == "POST") { | 125 if (method == "POST") { |
| 126 bool content_type_found = false; | 126 bool content_type_found = false; |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 } | 382 } |
| 383 | 383 |
| 384 if (error_code == net::OK) { | 384 if (error_code == net::OK) { |
| 385 plugin_stream_->DidFinishLoading(resource_id_); | 385 plugin_stream_->DidFinishLoading(resource_id_); |
| 386 } else { | 386 } else { |
| 387 plugin_stream_->DidFail(resource_id_); | 387 plugin_stream_->DidFail(resource_id_); |
| 388 } | 388 } |
| 389 } | 389 } |
| 390 | 390 |
| 391 } // namespace content | 391 } // namespace content |
| OLD | NEW |