diff options
author | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-20 17:55:53 +0000 |
---|---|---|
committer | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-20 17:55:53 +0000 |
commit | 224c0ad4d0d66825b957812a06c0e65d8d811ea7 (patch) | |
tree | ac7a516901cb9ae31fcf373e5ae1520a4b3e1b71 /net/proxy/proxy_server.cc | |
parent | 7b92c41ccc32a7b8a9a439a9a2a45d635a8d9caf (diff) | |
download | chromium_src-224c0ad4d0d66825b957812a06c0e65d8d811ea7.zip chromium_src-224c0ad4d0d66825b957812a06c0e65d8d811ea7.tar.gz chromium_src-224c0ad4d0d66825b957812a06c0e65d8d811ea7.tar.bz2 |
Add some plumbing for in-progress work on enabling SSL proxy support.
BUG=29625
TEST=none
Review URL: http://codereview.chromium.org/2832057
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53061 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/proxy_server.cc')
-rw-r--r-- | net/proxy/proxy_server.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/proxy/proxy_server.cc b/net/proxy/proxy_server.cc index ba45ff2..b78c347 100644 --- a/net/proxy/proxy_server.cc +++ b/net/proxy/proxy_server.cc @@ -34,6 +34,8 @@ ProxyServer::Scheme GetSchemeFromPacType(std::string::const_iterator begin, return ProxyServer::SCHEME_SOCKS5; if (LowerCaseEqualsASCII(begin, end, "direct")) return ProxyServer::SCHEME_DIRECT; + if (LowerCaseEqualsASCII(begin, end, "https")) + return ProxyServer::SCHEME_HTTPS; return ProxyServer::SCHEME_INVALID; } @@ -53,6 +55,8 @@ ProxyServer::Scheme GetSchemeFromURI(std::string::const_iterator begin, return ProxyServer::SCHEME_SOCKS5; if (LowerCaseEqualsASCII(begin, end, "direct")) return ProxyServer::SCHEME_DIRECT; + if (LowerCaseEqualsASCII(begin, end, "https")) + return ProxyServer::SCHEME_HTTPS; return ProxyServer::SCHEME_INVALID; } @@ -132,6 +136,8 @@ std::string ProxyServer::ToURI() const { return std::string("socks4://") + host_and_port(); case SCHEME_SOCKS5: return std::string("socks5://") + host_and_port(); + case SCHEME_HTTPS: + return std::string("https://") + host_and_port(); default: // Got called with an invalid scheme. NOTREACHED(); @@ -180,6 +186,8 @@ std::string ProxyServer::ToPacString() const { return std::string("SOCKS ") + host_and_port(); case SCHEME_SOCKS5: return std::string("SOCKS5 ") + host_and_port(); + case SCHEME_HTTPS: + return std::string("HTTPS ") + host_and_port(); default: // Got called with an invalid scheme. NOTREACHED(); @@ -195,6 +203,8 @@ int ProxyServer::GetDefaultPortForScheme(Scheme scheme) { case SCHEME_SOCKS4: case SCHEME_SOCKS5: return 1080; + case SCHEME_HTTPS: + return 443; default: return -1; } |