summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_server.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/proxy/proxy_server.cc')
-rw-r--r--net/proxy/proxy_server.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/net/proxy/proxy_server.cc b/net/proxy/proxy_server.cc
index 6875b4a..3b8bd03 100644
--- a/net/proxy/proxy_server.cc
+++ b/net/proxy/proxy_server.cc
@@ -208,6 +208,21 @@ ProxyServer::Scheme ProxyServer::GetSchemeFromURI(const std::string& scheme) {
return GetSchemeFromURIInternal(scheme.begin(), scheme.end());
}
+#if defined(SPDY_PROXY_AUTH_ORIGIN)
+ bool ProxyServer::isDataReductionProxy() const {
+ return host_port_pair_.Equals(
+ HostPortPair::FromURL(GURL(SPDY_PROXY_AUTH_ORIGIN)));
+ }
+
+ bool ProxyServer::isDataReductionProxyFallback() const {
+#if defined(DATA_REDUCTION_FALLBACK_HOST)
+ return host_port_pair_.Equals(
+ HostPortPair::FromURL(GURL(DATA_REDUCTION_FALLBACK_HOST)));
+#endif // defined(DATA_REDUCTION_FALLBACK_HOST)
+ return false;
+ }
+#endif // defined(SPDY_PROXY_AUTH_ORIGIN)
+
// static
ProxyServer ProxyServer::FromSchemeHostAndPort(
Scheme scheme,