summaryrefslogtreecommitdiffstats
path: root/components/data_reduction_proxy/common/data_reduction_proxy_headers.h
diff options
context:
space:
mode:
authorbengr@chromium.org <bengr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-10 01:21:39 +0000
committerbengr@chromium.org <bengr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-10 01:23:02 +0000
commitf09f968f9f0ba892cadca8574a382c41d4a979f9 (patch)
tree83ad7bc619bf6128199068d6b87776e58a6bfcef /components/data_reduction_proxy/common/data_reduction_proxy_headers.h
parent7a6ecef5cd867b2232c7ab9a0f00310ddd271160 (diff)
downloadchromium_src-f09f968f9f0ba892cadca8574a382c41d4a979f9.zip
chromium_src-f09f968f9f0ba892cadca8574a382c41d4a979f9.tar.gz
chromium_src-f09f968f9f0ba892cadca8574a382c41d4a979f9.tar.bz2
Removed data compression UMA from ProxyService
This change removes logic specific to the data reduction proxy from net::ProxyService and net::ProxyServer. To do so, it introduces a new method, net::NetworkDelegate::OnProxyFallback. BUG=396699 Review URL: https://codereview.chromium.org/425163004 Cr-Commit-Position: refs/heads/master@{#288603} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288603 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/data_reduction_proxy/common/data_reduction_proxy_headers.h')
-rw-r--r--components/data_reduction_proxy/common/data_reduction_proxy_headers.h45
1 files changed, 44 insertions, 1 deletions
diff --git a/components/data_reduction_proxy/common/data_reduction_proxy_headers.h b/components/data_reduction_proxy/common/data_reduction_proxy_headers.h
index 319d90d..6dc8800 100644
--- a/components/data_reduction_proxy/common/data_reduction_proxy_headers.h
+++ b/components/data_reduction_proxy/common/data_reduction_proxy_headers.h
@@ -19,6 +19,49 @@ class HttpResponseHeaders;
namespace data_reduction_proxy {
+// Values of the UMA DataReductionProxy.BypassType{Primary|Fallback}
+// and DataReductionProxy.BlockType{Primary|Fallback} histograms.
+// This enum must remain synchronized with the enum of the same
+// name in metrics/histograms/histograms.xml.
+enum DataReductionProxyBypassType {
+ // Bypass due to explicit instruction for the current request.
+ // Not yet supported.
+ BYPASS_EVENT_TYPE_CURRENT = 0,
+
+ // Bypass the proxy for less than one minute.
+ BYPASS_EVENT_TYPE_SHORT = 1,
+
+ // Bypass the proxy for one to five minutes.
+ BYPASS_EVENT_TYPE_MEDIUM = 2,
+
+ // Bypass the proxy for more than five minutes.
+ BYPASS_EVENT_TYPE_LONG = 3,
+
+ // Bypass due to a 4xx missing via header.
+ BYPASS_EVENT_TYPE_MISSING_VIA_HEADER_4XX = 4,
+
+ // Bypass due to other missing via header, excluding 4xx errors.
+ BYPASS_EVENT_TYPE_MISSING_VIA_HEADER_OTHER = 5,
+
+ // Bypass due to 407 response from proxy without a challenge.
+ BYPASS_EVENT_TYPE_MALFORMED_407 = 6,
+
+ // Bypass due to a 500 internal server error
+ BYPASS_EVENT_TYPE_STATUS_500_HTTP_INTERNAL_SERVER_ERROR = 7,
+
+ // Bypass because the request URI was too long.
+ BYPASS_EVENT_TYPE_STATUS_502_HTTP_BAD_GATEWAY = 8,
+
+ // Bypass due to a 503 response.
+ BYPASS_EVENT_TYPE_STATUS_503_HTTP_SERVICE_UNAVAILABLE = 9,
+
+ // Bypass due to any network error.
+ BYPASS_EVENT_TYPE_NETWORK_ERROR = 10,
+
+ // This must always be last.
+ BYPASS_EVENT_TYPE_MAX = 11
+};
+
// Contains instructions contained in the Chrome-Proxy header.
struct DataReductionProxyInfo {
DataReductionProxyInfo() : bypass_all(false) {}
@@ -51,7 +94,7 @@ bool HasDataReductionProxyViaHeader(const net::HttpResponseHeaders* headers,
// Returns the reason why the Chrome proxy should be bypassed or not, and
// populates |proxy_info| with information on how long to bypass if
// applicable.
-net::ProxyService::DataReductionProxyBypassType GetDataReductionProxyBypassType(
+DataReductionProxyBypassType GetDataReductionProxyBypassType(
const net::HttpResponseHeaders* headers,
DataReductionProxyInfo* proxy_info);