diff options
author | arindam@chromium.org <arindam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-14 05:23:30 +0000 |
---|---|---|
committer | arindam@chromium.org <arindam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-14 05:23:30 +0000 |
commit | 87a102b1bd6d2e450f10ed0931c09ffcfef9a51c (patch) | |
tree | 6877259bfdf9ec82c9952a1f66d9d450c037f331 /net/proxy/proxy_server.cc | |
parent | 565243e032009b7022b49c085b1157c3fb4986d4 (diff) | |
download | chromium_src-87a102b1bd6d2e450f10ed0931c09ffcfef9a51c.zip chromium_src-87a102b1bd6d2e450f10ed0931c09ffcfef9a51c.tar.gz chromium_src-87a102b1bd6d2e450f10ed0931c09ffcfef9a51c.tar.bz2 |
Whenever proxy configurations contain socks and http/https/ftp proxies, socks configuration over rid the other proxies. Fixes the issue. Attached test cases.
BUG=15738
TEST=unittest (ProxyConfigTest.ParseProxyRules, ProxyServiceTest.DefaultProxyFallbackToSOCKS)
Review URL: http://codereview.chromium.org/149191
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20605 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/proxy_server.cc')
-rw-r--r-- | net/proxy/proxy_server.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/proxy/proxy_server.cc b/net/proxy/proxy_server.cc index 50bf4d9..6c47fee 100644 --- a/net/proxy/proxy_server.cc +++ b/net/proxy/proxy_server.cc @@ -85,15 +85,17 @@ std::string ProxyServer::host_and_port() const { } // static -ProxyServer ProxyServer::FromURI(const std::string& uri) { - return FromURI(uri.begin(), uri.end()); +ProxyServer ProxyServer::FromURI(const std::string& uri, + Scheme default_scheme) { + return FromURI(uri.begin(), uri.end(), default_scheme); } // static ProxyServer ProxyServer::FromURI(std::string::const_iterator begin, - std::string::const_iterator end) { - // We will default to HTTP if no scheme specifier was given. - Scheme scheme = SCHEME_HTTP; + std::string::const_iterator end, + Scheme default_scheme) { + // We will default to |default_scheme| if no scheme specifier was given. + Scheme scheme = default_scheme; // Trim the leading/trailing whitespace. HttpUtil::TrimLWS(&begin, &end); |