| Index: chrome/utility/chrome_content_utility_client.cc
|
| diff --git a/chrome/utility/chrome_content_utility_client.cc b/chrome/utility/chrome_content_utility_client.cc
|
| index 111ac99c49b6405840988b078b17fbc79d933e3f..ba3dd5c6234651a1bc436bb3c2610eaaa93dcca6 100644
|
| --- a/chrome/utility/chrome_content_utility_client.cc
|
| +++ b/chrome/utility/chrome_content_utility_client.cc
|
| @@ -13,9 +13,11 @@
|
| #include "chrome/common/safe_browsing/zip_analyzer.h"
|
| #include "chrome/common/safe_browsing/zip_analyzer_results.h"
|
| #include "chrome/utility/chrome_content_utility_ipc_whitelist.h"
|
| +#include "chrome/utility/chrome_content_utility_process_impl.h"
|
| #include "chrome/utility/utility_message_handler.h"
|
| #include "content/public/child/image_decoder_utils.h"
|
| #include "content/public/common/content_switches.h"
|
| +#include "content/public/common/process.mojom.h"
|
| #include "content/public/common/service_registry.h"
|
| #include "content/public/utility/utility_thread.h"
|
| #include "courgette/courgette.h"
|
| @@ -29,7 +31,6 @@
|
|
|
| #if !defined(OS_ANDROID)
|
| #include "chrome/utility/profile_import_handler.h"
|
| -#include "net/proxy/mojo_proxy_resolver_factory_impl.h"
|
| #endif
|
|
|
| #if defined(OS_ANDROID) && defined(USE_SECCOMP_BPF)
|
| @@ -78,17 +79,6 @@ void FinishParseMediaMetadata(
|
| }
|
| #endif
|
|
|
| -#if !defined(OS_ANDROID)
|
| -void CreateProxyResolverFactory(
|
| - mojo::InterfaceRequest<net::interfaces::ProxyResolverFactory> request) {
|
| - // MojoProxyResolverFactoryImpl is strongly bound to the Mojo message pipe it
|
| - // is connected to. When that message pipe is closed, either explicitly on the
|
| - // other end (in the browser process), or by a connection error, this object
|
| - // will be destroyed.
|
| - new net::MojoProxyResolverFactoryImpl(request.Pass());
|
| -}
|
| -#endif // OS_ANDROID
|
| -
|
| } // namespace
|
|
|
| int64_t ChromeContentUtilityClient::max_ipc_message_size_ =
|
| @@ -184,10 +174,10 @@ bool ChromeContentUtilityClient::OnMessageReceived(
|
|
|
| void ChromeContentUtilityClient::RegisterMojoServices(
|
| content::ServiceRegistry* registry) {
|
| -#if !defined(OS_ANDROID)
|
| - registry->AddService<net::interfaces::ProxyResolverFactory>(
|
| - base::Bind(CreateProxyResolverFactory));
|
| -#endif
|
| + if (!process_impl_)
|
| + process_impl_.reset(new ChromeContentUtilityProcessImpl);
|
| + registry->AddService(base::Bind(
|
| + &ChromeContentUtilityClient::BindProcessRequest, base::Unretained(this)));
|
| }
|
|
|
| // static
|
| @@ -409,3 +399,9 @@ void ChromeContentUtilityClient::OnParseMediaMetadata(
|
| parser->Start(base::Bind(&FinishParseMediaMetadata, base::Owned(parser)));
|
| }
|
| #endif
|
| +
|
| +void ChromeContentUtilityClient::BindProcessRequest(
|
| + mojo::InterfaceRequest<content::Process> request) {
|
| + DCHECK(process_impl_);
|
| + process_bindings_.AddBinding(process_impl_.get(), request.Pass());
|
| +}
|
|
|