| Index: content/browser/renderer_host/render_process_host_impl.cc
|
| diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
| index 5dd6c0749f4c1c16d6604af6d03cf85d99a99273..87378d4016f07a4a1f925302579abc050431d9d1 100644
|
| --- a/content/browser/renderer_host/render_process_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_process_host_impl.cc
|
| @@ -136,6 +136,7 @@
|
| #include "content/common/content_switches_internal.h"
|
| #include "content/common/frame_messages.h"
|
| #include "content/common/in_process_child_thread_params.h"
|
| +#include "content/common/network_service.mojom.h"
|
| #include "content/common/render_process_messages.h"
|
| #include "content/common/resource_messages.h"
|
| #include "content/common/service_manager/child_connection.h"
|
| @@ -1415,6 +1416,14 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
|
| ->AddInterface(base::Bind(&RenderProcessHostImpl::BindRouteProvider,
|
| base::Unretained(this)));
|
|
|
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnableNetworkService)) {
|
| + AddUIThreadInterface(
|
| + registry.get(),
|
| + base::Bind(&RenderProcessHostImpl::CreateURLLoaderFactory,
|
| + base::Unretained(this)));
|
| + }
|
| +
|
| ServiceManagerConnection* service_manager_connection =
|
| BrowserContext::GetServiceManagerConnectionFor(browser_context_);
|
| std::unique_ptr<ConnectionFilterImpl> connection_filter(
|
| @@ -1488,6 +1497,18 @@ void RenderProcessHostImpl::CreateStoragePartitionService(
|
| }
|
| }
|
|
|
| +void RenderProcessHostImpl::CreateURLLoaderFactory(
|
| + const service_manager::BindSourceInfo& source_info,
|
| + mojom::URLLoaderFactoryRequest request) {
|
| + if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnableNetworkService)) {
|
| + NOTREACHED();
|
| + return;
|
| + }
|
| + storage_partition_impl_->network_context()->CreateURLLoaderFactory(
|
| + std::move(request), id_);
|
| +}
|
| +
|
| int RenderProcessHostImpl::GetNextRoutingID() {
|
| return widget_helper_->GetNextRoutingID();
|
| }
|
|
|