| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 6693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6704 if (GetContentClient()->renderer()->ShouldOverridePageVisibilityState( | 6704 if (GetContentClient()->renderer()->ShouldOverridePageVisibilityState( |
| 6705 this, &override_state)) | 6705 this, &override_state)) |
| 6706 return override_state; | 6706 return override_state; |
| 6707 return current_state; | 6707 return current_state; |
| 6708 } | 6708 } |
| 6709 | 6709 |
| 6710 std::unique_ptr<blink::WebURLLoader> RenderFrameImpl::CreateURLLoader( | 6710 std::unique_ptr<blink::WebURLLoader> RenderFrameImpl::CreateURLLoader( |
| 6711 const blink::WebURLRequest& request, | 6711 const blink::WebURLRequest& request, |
| 6712 base::SingleThreadTaskRunner* task_runner) { | 6712 base::SingleThreadTaskRunner* task_runner) { |
| 6713 ChildThreadImpl* child_thread = ChildThreadImpl::current(); | 6713 ChildThreadImpl* child_thread = ChildThreadImpl::current(); |
| 6714 const bool network_service_enabled = | 6714 if (base::FeatureList::IsEnabled(features::kNetworkService) && child_thread) { |
| 6715 base::CommandLine::ForCurrentProcess()->HasSwitch( | |
| 6716 switches::kEnableNetworkService); | |
| 6717 if (network_service_enabled && child_thread) { | |
| 6718 // Use if per-frame or per-scheme URLLoaderFactory is given. | 6715 // Use if per-frame or per-scheme URLLoaderFactory is given. |
| 6719 mojom::URLLoaderFactory* factory = url_loader_factory_.get(); | 6716 mojom::URLLoaderFactory* factory = url_loader_factory_.get(); |
| 6720 | 6717 |
| 6721 if (request.Url().ProtocolIs(url::kBlobScheme)) | 6718 if (request.Url().ProtocolIs(url::kBlobScheme)) |
| 6722 factory = RenderThreadImpl::current()->GetBlobURLLoaderFactory(); | 6719 factory = RenderThreadImpl::current()->GetBlobURLLoaderFactory(); |
| 6723 | 6720 |
| 6724 if (factory) { | 6721 if (factory) { |
| 6725 return base::MakeUnique<WebURLLoaderImpl>( | 6722 return base::MakeUnique<WebURLLoaderImpl>( |
| 6726 child_thread->resource_dispatcher(), task_runner, factory); | 6723 child_thread->resource_dispatcher(), task_runner, factory); |
| 6727 } | 6724 } |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6903 replaces_current_history_item(info.replaces_current_history_item), | 6900 replaces_current_history_item(info.replaces_current_history_item), |
| 6904 history_navigation_in_new_child_frame( | 6901 history_navigation_in_new_child_frame( |
| 6905 info.is_history_navigation_in_new_child_frame), | 6902 info.is_history_navigation_in_new_child_frame), |
| 6906 client_redirect(info.is_client_redirect), | 6903 client_redirect(info.is_client_redirect), |
| 6907 triggering_event_info(info.triggering_event_info), | 6904 triggering_event_info(info.triggering_event_info), |
| 6908 cache_disabled(info.is_cache_disabled), | 6905 cache_disabled(info.is_cache_disabled), |
| 6909 form(info.form), | 6906 form(info.form), |
| 6910 source_location(info.source_location) {} | 6907 source_location(info.source_location) {} |
| 6911 | 6908 |
| 6912 } // namespace content | 6909 } // namespace content |
| OLD | NEW |