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

Unified Diff: chrome/browser/net/proxy_service_factory.cc

Issue 910343003: Create an in-process v8 proxy resolver using Mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v8-pac-complete-patch
Patch Set: Remove extra space. Created 5 years, 9 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
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/proxy_service_factory.cc
diff --git a/chrome/browser/net/proxy_service_factory.cc b/chrome/browser/net/proxy_service_factory.cc
index ceaef642cf8db623a2b4b257b8423728dc54152b..c30fab86cc9b99c61bd2fa2397b0206f6544fc7c 100644
--- a/chrome/browser/net/proxy_service_factory.cc
+++ b/chrome/browser/net/proxy_service_factory.cc
@@ -29,6 +29,10 @@
#include "net/proxy/proxy_resolver_v8.h"
#endif
+#if !defined(OS_IOS) && !defined(OS_ANDROID)
+#include "net/proxy/proxy_service_mojo.h"
+#endif
+
using content::BrowserThread;
// static
@@ -129,13 +133,21 @@ net::ProxyService* ProxyServiceFactory::CreateProxyService(
dhcp_proxy_script_fetcher = dhcp_factory.Create(context);
#endif
- proxy_service = net::CreateProxyServiceUsingV8ProxyResolver(
- proxy_config_service,
- new net::ProxyScriptFetcherImpl(context),
- dhcp_proxy_script_fetcher,
- context->host_resolver(),
- net_log,
- network_delegate);
+#if !defined(OS_ANDROID)
+ if (command_line.HasSwitch(switches::kV8PacMojoInProcess)) {
+ proxy_service = net::CreateProxyServiceUsingMojoInProcess(
+ proxy_config_service, new net::ProxyScriptFetcherImpl(context),
+ dhcp_proxy_script_fetcher, context->host_resolver(), net_log,
+ network_delegate);
+ }
+#endif // !defined(OS_ANDROID)
+
+ if (!proxy_service) {
+ proxy_service = net::CreateProxyServiceUsingV8ProxyResolver(
+ proxy_config_service, new net::ProxyScriptFetcherImpl(context),
+ dhcp_proxy_script_fetcher, context->host_resolver(), net_log,
+ network_delegate);
+ }
#endif // defined(OS_IOS)
} else {
proxy_service = net::ProxyService::CreateUsingSystemProxyResolver(
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698