| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 pending_failure_notification_(false) { | 107 pending_failure_notification_(false) { |
| 108 RequestInfo request_info; | 108 RequestInfo request_info; |
| 109 request_info.method = method; | 109 request_info.method = method; |
| 110 request_info.url = url; | 110 request_info.url = url; |
| 111 request_info.first_party_for_cookies = first_party_for_cookies; | 111 request_info.first_party_for_cookies = first_party_for_cookies; |
| 112 request_info.referrer = referrer; | 112 request_info.referrer = referrer; |
| 113 request_info.load_flags = net::LOAD_NORMAL; | 113 request_info.load_flags = net::LOAD_NORMAL; |
| 114 request_info.requestor_pid = origin_pid; | 114 request_info.requestor_pid = origin_pid; |
| 115 request_info.request_type = RESOURCE_TYPE_OBJECT; | 115 request_info.request_type = RESOURCE_TYPE_OBJECT; |
| 116 request_info.routing_id = render_view_id; | 116 request_info.routing_id = render_view_id; |
| 117 // ServiceWorker is disabled for NPAPI. |
| 118 request_info.skip_service_worker = true; |
| 117 | 119 |
| 118 RequestExtraData extra_data; | 120 RequestExtraData extra_data; |
| 119 extra_data.set_render_frame_id(render_frame_id); | 121 extra_data.set_render_frame_id(render_frame_id); |
| 120 extra_data.set_is_main_frame(false); | 122 extra_data.set_is_main_frame(false); |
| 121 request_info.extra_data = &extra_data; | 123 request_info.extra_data = &extra_data; |
| 122 | 124 |
| 123 std::vector<char> body; | 125 std::vector<char> body; |
| 124 if (method == "POST") { | 126 if (method == "POST") { |
| 125 bool content_type_found = false; | 127 bool content_type_found = false; |
| 126 std::vector<std::string> names; | 128 std::vector<std::string> names; |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 } | 368 } |
| 367 | 369 |
| 368 if (error_code == net::OK) { | 370 if (error_code == net::OK) { |
| 369 plugin_stream_->DidFinishLoading(resource_id_); | 371 plugin_stream_->DidFinishLoading(resource_id_); |
| 370 } else { | 372 } else { |
| 371 plugin_stream_->DidFail(resource_id_); | 373 plugin_stream_->DidFail(resource_id_); |
| 372 } | 374 } |
| 373 } | 375 } |
| 374 | 376 |
| 375 } // namespace content | 377 } // namespace content |
| OLD | NEW |