OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 4292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4303 // was a navigation initiated by the renderer to the new RequestExtraData | 4303 // was a navigation initiated by the renderer to the new RequestExtraData |
4304 // instance. | 4304 // instance. |
4305 RequestExtraData* current_request_data = | 4305 RequestExtraData* current_request_data = |
4306 static_cast<RequestExtraData*>(request.GetExtraData()); | 4306 static_cast<RequestExtraData*>(request.GetExtraData()); |
4307 if (current_request_data) { | 4307 if (current_request_data) { |
4308 extra_data->set_navigation_initiated_by_renderer( | 4308 extra_data->set_navigation_initiated_by_renderer( |
4309 current_request_data->navigation_initiated_by_renderer()); | 4309 current_request_data->navigation_initiated_by_renderer()); |
4310 } | 4310 } |
4311 } | 4311 } |
4312 | 4312 |
4313 extra_data->set_url_loader_factory_override(url_loader_factory_.get()); | 4313 // TODO: generalize how non-network schemes are sent to the renderer and used. |
kinuko
2017/06/07 04:58:35
Filed a bug- crbug.com/730338
| |
4314 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | |
4315 switches::kEnableNetworkService)) { | |
4316 if (request.Url().ProtocolIs(url::kBlobScheme)) { | |
4317 extra_data->set_url_loader_factory_override( | |
4318 RenderThreadImpl::current()->GetBlobURLLoaderFactory()); | |
4319 } | |
4320 } | |
4321 | |
4322 if (!extra_data->url_loader_factory_override()) | |
4323 extra_data->set_url_loader_factory_override(url_loader_factory_.get()); | |
4324 | |
4314 // TODO(kinuko, yzshen): We need to set up throttles for some worker cases | 4325 // TODO(kinuko, yzshen): We need to set up throttles for some worker cases |
4315 // that don't go through here. | 4326 // that don't go through here. |
4316 extra_data->set_url_loader_throttles(std::move(throttles)); | 4327 extra_data->set_url_loader_throttles(std::move(throttles)); |
4317 | 4328 |
4318 request.SetExtraData(extra_data); | 4329 request.SetExtraData(extra_data); |
4319 | 4330 |
4320 if (request.GetPreviewsState() == WebURLRequest::kPreviewsUnspecified) { | 4331 if (request.GetPreviewsState() == WebURLRequest::kPreviewsUnspecified) { |
4321 if (is_main_frame_ && !navigation_state->request_committed()) { | 4332 if (is_main_frame_ && !navigation_state->request_committed()) { |
4322 request.SetPreviewsState(static_cast<WebURLRequest::PreviewsState>( | 4333 request.SetPreviewsState(static_cast<WebURLRequest::PreviewsState>( |
4323 navigation_state->common_params().previews_state)); | 4334 navigation_state->common_params().previews_state)); |
(...skipping 2471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6795 policy(info.default_policy), | 6806 policy(info.default_policy), |
6796 replaces_current_history_item(info.replaces_current_history_item), | 6807 replaces_current_history_item(info.replaces_current_history_item), |
6797 history_navigation_in_new_child_frame( | 6808 history_navigation_in_new_child_frame( |
6798 info.is_history_navigation_in_new_child_frame), | 6809 info.is_history_navigation_in_new_child_frame), |
6799 client_redirect(info.is_client_redirect), | 6810 client_redirect(info.is_client_redirect), |
6800 cache_disabled(info.is_cache_disabled), | 6811 cache_disabled(info.is_cache_disabled), |
6801 form(info.form), | 6812 form(info.form), |
6802 source_location(info.source_location) {} | 6813 source_location(info.source_location) {} |
6803 | 6814 |
6804 } // namespace content | 6815 } // namespace content |
OLD | NEW |