| 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 d8afadb8756cb16edfc30060922dd2bca6bc41a4..f833223326238395c2dee7f054f7fd45df4cf55a 100644
|
| --- a/content/browser/renderer_host/render_process_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_process_host_impl.cc
|
| @@ -137,6 +137,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();
|
| }
|
|
|