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

Unified Diff: net/proxy/proxy_resolver_mac.cc

Issue 383010: Grab SOCKS settings from system prefs.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_resolver_mac.cc
===================================================================
--- net/proxy/proxy_resolver_mac.cc (revision 31560)
+++ net/proxy/proxy_resolver_mac.cc (working copy)
@@ -165,7 +165,7 @@
config->pac_url = GURL(base::SysCFStringRefToUTF8(pac_url_ref));
}
- // proxies (for now only ftp, http and https)
+ // proxies (for now ftp, http, https, and SOCKS)
if (GetBoolFromDictionary(config_dict.get(),
kSCPropNetProxiesFTPEnable,
@@ -206,6 +206,19 @@
config->proxy_rules.proxy_for_https = proxy_server;
}
}
+ if (GetBoolFromDictionary(config_dict.get(),
+ kSCPropNetProxiesSOCKSEnable,
+ false)) {
+ ProxyServer proxy_server =
+ GetProxyServerFromDictionary(ProxyServer::SCHEME_SOCKS5,
+ config_dict.get(),
+ kSCPropNetProxiesSOCKSProxy,
+ kSCPropNetProxiesSOCKSPort);
+ if (proxy_server.is_valid()) {
+ config->proxy_rules.type = ProxyConfig::ProxyRules::TYPE_PROXY_PER_SCHEME;
+ config->proxy_rules.socks_proxy = proxy_server;
+ }
+ }
// proxy bypass list
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698