| 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/npapi/plugin_host.h" | 9 #include "content/child/npapi/plugin_host.h" |
| 10 #include "content/child/npapi/plugin_instance.h" | 10 #include "content/child/npapi/plugin_instance.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 RequestInfo request_info; | 101 RequestInfo request_info; |
| 102 request_info.method = method; | 102 request_info.method = method; |
| 103 request_info.url = url; | 103 request_info.url = url; |
| 104 request_info.first_party_for_cookies = first_party_for_cookies; | 104 request_info.first_party_for_cookies = first_party_for_cookies; |
| 105 request_info.referrer = referrer; | 105 request_info.referrer = referrer; |
| 106 request_info.load_flags = net::LOAD_NORMAL; | 106 request_info.load_flags = net::LOAD_NORMAL; |
| 107 request_info.requestor_pid = origin_pid; | 107 request_info.requestor_pid = origin_pid; |
| 108 request_info.request_type = ResourceType::OBJECT; | 108 request_info.request_type = ResourceType::OBJECT; |
| 109 request_info.routing_id = render_view_id; | 109 request_info.routing_id = render_view_id; |
| 110 | 110 |
| 111 RequestExtraData extra_data(blink::WebPageVisibilityStateVisible, | 111 RequestExtraData extra_data; |
| 112 base::string16(), | 112 extra_data.set_render_frame_id(render_frame_id); |
| 113 false, | 113 extra_data.set_is_main_frame(false); |
| 114 render_frame_id, | |
| 115 false, | |
| 116 GURL(), | |
| 117 false, | |
| 118 -1, | |
| 119 true, | |
| 120 PAGE_TRANSITION_LINK, | |
| 121 false, | |
| 122 -1, | |
| 123 -1, | |
| 124 kInvalidServiceWorkerProviderId); | |
| 125 | |
| 126 request_info.extra_data = &extra_data; | 114 request_info.extra_data = &extra_data; |
| 127 | 115 |
| 128 std::vector<char> body; | 116 std::vector<char> body; |
| 129 if (method == "POST") { | 117 if (method == "POST") { |
| 130 bool content_type_found = false; | 118 bool content_type_found = false; |
| 131 std::vector<std::string> names; | 119 std::vector<std::string> names; |
| 132 std::vector<std::string> values; | 120 std::vector<std::string> values; |
| 133 PluginHost::SetPostData(buf, len, &names, &values, &body); | 121 PluginHost::SetPostData(buf, len, &names, &values, &body); |
| 134 for (size_t i = 0; i < names.size(); ++i) { | 122 for (size_t i = 0; i < names.size(); ++i) { |
| 135 if (!request_info.headers.empty()) | 123 if (!request_info.headers.empty()) |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 } | 341 } |
| 354 | 342 |
| 355 if (error_code == net::OK) { | 343 if (error_code == net::OK) { |
| 356 plugin_stream_->DidFinishLoading(resource_id_); | 344 plugin_stream_->DidFinishLoading(resource_id_); |
| 357 } else { | 345 } else { |
| 358 plugin_stream_->DidFail(resource_id_); | 346 plugin_stream_->DidFail(resource_id_); |
| 359 } | 347 } |
| 360 } | 348 } |
| 361 | 349 |
| 362 } // namespace content | 350 } // namespace content |
| OLD | NEW |