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

Unified Diff: net/proxy/proxy_server.cc

Issue 382313003: Add data reduction functionality to all platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed bengr comments - II. Created 6 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
Index: net/proxy/proxy_server.cc
diff --git a/net/proxy/proxy_server.cc b/net/proxy/proxy_server.cc
index b0997e0a0fa8ec31d0fbc06f55bebdc2f27ce035..d74a89f0bdf33e302035b95a5faf27a0ca2035d1 100644
--- a/net/proxy/proxy_server.cc
+++ b/net/proxy/proxy_server.cc
@@ -88,7 +88,8 @@ ProxyServer::ProxyServer(Scheme scheme, const HostPortPair& host_port_pair)
const HostPortPair& ProxyServer::host_port_pair() const {
// Doesn't make sense to call this if the URI scheme doesn't
// have concept of a host.
- DCHECK(is_valid() && !is_direct());
+ DCHECK(is_valid());
+ DCHECK(!is_direct());
return host_port_pair_;
}
@@ -219,27 +220,6 @@ ProxyServer::Scheme ProxyServer::GetSchemeFromURI(const std::string& scheme) {
return GetSchemeFromURIInternal(scheme.begin(), scheme.end());
}
-// TODO(bengr): Use |scheme_| to indicate that this is the data reduction proxy.
-#if defined(SPDY_PROXY_AUTH_ORIGIN)
-bool ProxyServer::isDataReductionProxy() const {
- bool dev_host = false;
-#if defined (DATA_REDUCTION_DEV_HOST)
- dev_host = host_port_pair_.Equals(
- HostPortPair::FromURL(GURL(DATA_REDUCTION_DEV_HOST)));
-#endif
- return dev_host || 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,

Powered by Google App Engine
This is Rietveld 408576698