Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1430)

Unified Diff: chrome/utility/chrome_content_utility_client.cc

Issue 940813003: Use a utility process for the Mojo v8 proxy resolver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v8-pac-in-process-enable
Patch Set: Add browser test Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..27b7ca2ed4198864a5d46bfbde91f9216906b11d 100644
--- a/chrome/utility/chrome_content_utility_client.cc
+++ b/chrome/utility/chrome_content_utility_client.cc
@@ -15,10 +15,12 @@
#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"
#include "ipc/ipc_channel.h"
+#include "net/proxy/mojo_proxy_resolver_factory_impl.h"
#include "skia/ext/image_operations.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/zlib/google/zip.h"
@@ -160,6 +162,21 @@ bool ChromeContentUtilityClient::OnMessageReceived(
return handled;
}
+namespace {
+
+void CreateProxyResolverFactory(
+ mojo::InterfaceRequest<net::interfaces::ProxyResolverFactory> request) {
+ new net::MojoProxyResolverFactoryImpl(request.Pass());
Lei Zhang 2015/03/03 07:50:02 Can you add a comment re: MojoProxyResolverFactory
Anand Mistry (off Chromium) 2015/03/05 05:11:02 Done.
+}
+
+} // namespace
+
+void ChromeContentUtilityClient::RegisterMojoServices(
+ content::ServiceRegistry* registry) {
+ registry->AddService<net::interfaces::ProxyResolverFactory>(
+ base::Bind(CreateProxyResolverFactory));
+}
+
// static
void ChromeContentUtilityClient::PreSandboxStartup() {
#if defined(ENABLE_EXTENSIONS)

Powered by Google App Engine
This is Rietveld 408576698