| 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 843b1f37ea88030b14df9df1bb7689375d07486c..d82c23bf5479e1b7cf85f27b64a0953c7d635c47 100644
|
| --- a/chrome/utility/chrome_content_utility_client.cc
|
| +++ b/chrome/utility/chrome_content_utility_client.cc
|
| @@ -15,6 +15,7 @@
|
| #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/service_registry.h"
|
| #include "content/public/utility/utility_thread.h"
|
| #include "courgette/courgette.h"
|
| #include "courgette/third_party/bsdiff.h"
|
| @@ -27,6 +28,7 @@
|
|
|
| #if !defined(OS_ANDROID)
|
| #include "chrome/utility/profile_import_handler.h"
|
| +#include "net/proxy/mojo_proxy_resolver_factory_impl.h"
|
| #endif
|
|
|
| #if defined(OS_WIN)
|
| @@ -71,6 +73,17 @@ 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_ =
|
| @@ -160,6 +173,14 @@ bool ChromeContentUtilityClient::OnMessageReceived(
|
| return handled;
|
| }
|
|
|
| +void ChromeContentUtilityClient::RegisterMojoServices(
|
| + content::ServiceRegistry* registry) {
|
| +#if !defined(OS_ANDROID)
|
| + registry->AddService<net::interfaces::ProxyResolverFactory>(
|
| + base::Bind(CreateProxyResolverFactory));
|
| +#endif
|
| +}
|
| +
|
| // static
|
| void ChromeContentUtilityClient::PreSandboxStartup() {
|
| #if defined(ENABLE_EXTENSIONS)
|
|
|