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

Unified Diff: net/proxy/proxy_config_service_common_unittest.cc

Issue 149191: Whenever proxy configurations contain socks and http/https/ftp proxies, socks... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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_config_service_common_unittest.h ('k') | net/proxy/proxy_config_service_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_config_service_common_unittest.cc
===================================================================
--- net/proxy/proxy_config_service_common_unittest.cc (revision 20472)
+++ net/proxy/proxy_config_service_common_unittest.cc (working copy)
@@ -16,19 +16,26 @@
const char* single_proxy,
const char* proxy_for_http,
const char* proxy_for_https,
- const char* proxy_for_ftp) {
+ const char* proxy_for_ftp,
+ const char* socks_proxy) {
ProxyConfig::ProxyRules rules;
rules.type = type;
- rules.single_proxy = ProxyServer::FromURI(single_proxy);
- rules.proxy_for_http = ProxyServer::FromURI(proxy_for_http);
- rules.proxy_for_https = ProxyServer::FromURI(proxy_for_https);
- rules.proxy_for_ftp = ProxyServer::FromURI(proxy_for_ftp);
+ rules.single_proxy = ProxyServer::FromURI(single_proxy,
+ ProxyServer::SCHEME_HTTP);
+ rules.proxy_for_http = ProxyServer::FromURI(proxy_for_http,
+ ProxyServer::SCHEME_HTTP);
+ rules.proxy_for_https = ProxyServer::FromURI(proxy_for_https,
+ ProxyServer::SCHEME_HTTP);
+ rules.proxy_for_ftp = ProxyServer::FromURI(proxy_for_ftp,
+ ProxyServer::SCHEME_HTTP);
+ rules.socks_proxy = ProxyServer::FromURI(socks_proxy,
+ ProxyServer::SCHEME_SOCKS4);
return rules;
}
ProxyConfig::ProxyRules MakeSingleProxyRules(const char* single_proxy) {
return MakeProxyRules(ProxyConfig::ProxyRules::TYPE_SINGLE_PROXY,
- single_proxy, "", "", "");
+ single_proxy, "", "", "", "");
}
ProxyConfig::ProxyRules MakeProxyPerSchemeRules(
@@ -36,8 +43,16 @@
const char* proxy_https,
const char* proxy_ftp) {
return MakeProxyRules(ProxyConfig::ProxyRules::TYPE_PROXY_PER_SCHEME,
- "", proxy_http, proxy_https, proxy_ftp);
+ "", proxy_http, proxy_https, proxy_ftp, "");
}
+ProxyConfig::ProxyRules MakeProxyPerSchemeRules(
+ const char* proxy_http,
+ const char* proxy_https,
+ const char* proxy_ftp,
+ const char* socks_proxy) {
+ return MakeProxyRules(ProxyConfig::ProxyRules::TYPE_PROXY_PER_SCHEME,
+ "", proxy_http, proxy_https, proxy_ftp, socks_proxy);
+}
std::string FlattenProxyBypass(const BypassList& proxy_bypass) {
std::string flattened_proxy_bypass;
« no previous file with comments | « net/proxy/proxy_config_service_common_unittest.h ('k') | net/proxy/proxy_config_service_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698