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

Unified Diff: net/proxy/proxy_resolver_mac.cc

Issue 57011: Extract the parsing of proxy rules to ProxyConfig::ProxyRules, and unit-test.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: address wtc's second batch of comments -- second try, got rietveld 500 before... Created 11 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 | « net/proxy/proxy_list.cc ('k') | net/proxy/proxy_server.h » ('j') | 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 12729)
+++ net/proxy/proxy_resolver_mac.cc (working copy)
@@ -176,8 +176,8 @@
kSCPropNetProxiesFTPProxy,
kSCPropNetProxiesFTPPort);
if (proxy_server.is_valid()) {
- config->proxy_rules += "ftp=";
- config->proxy_rules += proxy_server.ToURI();
+ config->proxy_rules.type = ProxyConfig::ProxyRules::TYPE_PROXY_PER_SCHEME;
+ config->proxy_rules.proxy_for_ftp = proxy_server;
}
}
if (GetBoolFromDictionary(config_dict.get(),
@@ -189,10 +189,8 @@
kSCPropNetProxiesHTTPProxy,
kSCPropNetProxiesHTTPPort);
if (proxy_server.is_valid()) {
- if (!config->proxy_rules.empty())
- config->proxy_rules += ";";
- config->proxy_rules += "http=";
- config->proxy_rules += proxy_server.ToURI();
+ config->proxy_rules.type = ProxyConfig::ProxyRules::TYPE_PROXY_PER_SCHEME;
+ config->proxy_rules.proxy_for_http = proxy_server;
}
}
if (GetBoolFromDictionary(config_dict.get(),
@@ -204,10 +202,8 @@
kSCPropNetProxiesHTTPSProxy,
kSCPropNetProxiesHTTPSPort);
if (proxy_server.is_valid()) {
- if (!config->proxy_rules.empty())
- config->proxy_rules += ";";
- config->proxy_rules += "https=";
- config->proxy_rules += proxy_server.ToURI();
+ config->proxy_rules.type = ProxyConfig::ProxyRules::TYPE_PROXY_PER_SCHEME;
+ config->proxy_rules.proxy_for_https = proxy_server;
}
}
« no previous file with comments | « net/proxy/proxy_list.cc ('k') | net/proxy/proxy_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698