summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_server.cc
diff options
context:
space:
mode:
authorbengr@chromium.org <bengr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-08 00:51:18 +0000
committerbengr@chromium.org <bengr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-08 00:51:18 +0000
commit6ee97bc958ab1e45df101763dbd7afd2c7cb6526 (patch)
treebd7059db40b4e1a3a11698250eb1792c39fc3e72 /net/proxy/proxy_server.cc
parentf4cfab217d3c316c53eaf16b519d976a6f3d7f69 (diff)
downloadchromium_src-6ee97bc958ab1e45df101763dbd7afd2c7cb6526.zip
chromium_src-6ee97bc958ab1e45df101763dbd7afd2c7cb6526.tar.gz
chromium_src-6ee97bc958ab1e45df101763dbd7afd2c7cb6526.tar.bz2
Added UMA to track data reduction proxy probe URL and fallback
This change adds UMA to track the outcome of probing a canary URL and adds UMA to track events that leads to the proxy being bypassed. BUG=314150 Review URL: https://codereview.chromium.org/52803010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233733 0039d316-1c4b-4281-b951-d872f2087c98
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,