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

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

Issue 10882010: Add iOS support to ProxyService (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added related files from chrome/browser/net Created 8 years, 4 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/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 a738f083d67e6a597d5227916c128e0862ffbfc1..5c6937483fcbfcbecc3472f61d060688e5cea4f1 100644
--- a/chrome/browser/net/proxy_service_factory.cc
+++ b/chrome/browser/net/proxy_service_factory.cc
@@ -77,6 +77,9 @@ net::ProxyService* ProxyServiceFactory::CreateProxyService(
const CommandLine& command_line) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+#if defined(OS_IOS)
+ bool use_v8 = false;
+#else
bool use_v8 = !command_line.HasSwitch(switches::kWinHttpProxyResolver);
if (use_v8 && command_line.HasSwitch(switches::kSingleProcess)) {
// See the note about V8 multithreading in net/proxy/proxy_resolver_v8.h
@@ -84,6 +87,7 @@ net::ProxyService* ProxyServiceFactory::CreateProxyService(
LOG(ERROR) << "Cannot use V8 Proxy resolver in single process mode.";
use_v8 = false; // Fallback to non-v8 implementation.
}
+#endif // defined(OS_IOS)
size_t num_pac_threads = 0u; // Use default number of threads.
@@ -103,6 +107,9 @@ net::ProxyService* ProxyServiceFactory::CreateProxyService(
net::ProxyService* proxy_service;
if (use_v8) {
+#if defined(OS_IOS)
+ NOTREACHED();
+#else
net::DhcpProxyScriptFetcherFactory dhcp_factory;
if (command_line.HasSwitch(switches::kDisableDhcpWpad)) {
dhcp_factory.set_enabled(false);
@@ -116,6 +123,7 @@ net::ProxyService* ProxyServiceFactory::CreateProxyService(
context->host_resolver(),
net_log,
context->network_delegate());
+#endif // defined(OS_IOS)
} else {
proxy_service = net::ProxyService::CreateUsingSystemProxyResolver(
proxy_config_service,

Powered by Google App Engine
This is Rietveld 408576698