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

Unified Diff: net/proxy/proxy_server.cc

Issue 144623006: Implement support for QUIC proxies in ProxyServer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comments Created 6 years, 11 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_server.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_server.cc
diff --git a/net/proxy/proxy_server.cc b/net/proxy/proxy_server.cc
index deb77913ecb5ae9b0574e1bfbb1f5c8084b439a0..b0997e0a0fa8ec31d0fbc06f55bebdc2f27ce035 100644
--- a/net/proxy/proxy_server.cc
+++ b/net/proxy/proxy_server.cc
@@ -36,6 +36,8 @@ ProxyServer::Scheme GetSchemeFromPacTypeInternal(
return ProxyServer::SCHEME_DIRECT;
if (LowerCaseEqualsASCII(begin, end, "https"))
return ProxyServer::SCHEME_HTTPS;
+ if (LowerCaseEqualsASCII(begin, end, "quic"))
+ return ProxyServer::SCHEME_QUIC;
return ProxyServer::SCHEME_INVALID;
}
@@ -57,6 +59,8 @@ ProxyServer::Scheme GetSchemeFromURIInternal(std::string::const_iterator begin,
return ProxyServer::SCHEME_DIRECT;
if (LowerCaseEqualsASCII(begin, end, "https"))
return ProxyServer::SCHEME_HTTPS;
+ if (LowerCaseEqualsASCII(begin, end, "quic"))
+ return ProxyServer::SCHEME_QUIC;
return ProxyServer::SCHEME_INVALID;
}
@@ -131,6 +135,8 @@ std::string ProxyServer::ToURI() const {
return std::string("socks5://") + host_port_pair().ToString();
case SCHEME_HTTPS:
return std::string("https://") + host_port_pair().ToString();
+ case SCHEME_QUIC:
+ return std::string("quic://") + host_port_pair().ToString();
default:
// Got called with an invalid scheme.
NOTREACHED();
@@ -181,6 +187,8 @@ std::string ProxyServer::ToPacString() const {
return std::string("SOCKS5 ") + host_port_pair().ToString();
case SCHEME_HTTPS:
return std::string("HTTPS ") + host_port_pair().ToString();
+ case SCHEME_QUIC:
+ return std::string("QUIC ") + host_port_pair().ToString();
default:
// Got called with an invalid scheme.
NOTREACHED();
@@ -197,10 +205,13 @@ int ProxyServer::GetDefaultPortForScheme(Scheme scheme) {
case SCHEME_SOCKS5:
return 1080;
case SCHEME_HTTPS:
+ case SCHEME_QUIC:
return 443;
- default:
- return -1;
+ case SCHEME_INVALID:
+ case SCHEME_DIRECT:
+ break;
}
+ return -1;
}
// static
« no previous file with comments | « net/proxy/proxy_server.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698