Index: components/data_reduction_proxy/core/common/data_reduction_proxy_params.h |
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_params.h b/components/data_reduction_proxy/core/common/data_reduction_proxy_params.h |
index 8d23e0b682682f4e39f092a237ed8aad400ace56..4bcb3ab8ba90a8504cf1610ca1fb0a69f6b17826 100644 |
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_params.h |
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_params.h |
@@ -90,6 +90,14 @@ class DataReductionProxyParams { |
// the data reduction proxy via header is missing. |
static bool IsIncludedInRemoveMissingViaHeaderOtherBypassFieldTrial(); |
+ // Returns true if this client is part of field trial to show bypass warnings |
+ // for the data reduction proxy. |
+ static bool IsBypassWarningEnabledInFlags(); |
+ |
+ // Returns true if the scheme of |url| is able to go through the data |
bengr
2014/12/31 01:10:21
Returns true if the Data Reduction Proxy supports
megjablon
2014/12/31 02:12:29
Done.
|
+ // reduction proxy. |
+ static bool CanProxyURLScheme(const GURL& url); |
+ |
// Constructs configuration parameters. If |kAllowed|, then the standard |
// data reduction proxy configuration is allowed to be used. If |
// |kfallbackAllowed| a fallback proxy can be used if the primary proxy is |
@@ -135,8 +143,8 @@ class DataReductionProxyParams { |
// Returns true if this request would be bypassed by the data request proxy |
// based on applying the |data_reduction_proxy_config| param rules to the |
- // request URL. |
- bool IsBypassedByDataReductionProxyLocalRules( |
+ // request URL. Virutal for testing. |
+ virtual bool IsBypassedByDataReductionProxyLocalRules( |
const net::URLRequest& request, |
const net::ProxyConfig& data_reduction_proxy_config) const; |
@@ -146,9 +154,10 @@ class DataReductionProxyParams { |
// proxies are bypassed, returns the minimum retry delay of the bypassed data |
// reduction proxies in min_retry_delay (if not NULL). If there are no |
// bypassed data reduction proxies for the request scheme, returns false and |
- // does not assign min_retry_delay. |
- bool AreDataReductionProxiesBypassed(const net::URLRequest& request, |
- base::TimeDelta* min_retry_delay) const; |
+ // does not assign min_retry_delay. Virtual for testing. |
+ virtual bool AreDataReductionProxiesBypassed( |
+ const net::URLRequest& request, |
+ base::TimeDelta* min_retry_delay) const; |
// Checks if all configured data reduction proxies are in the retry map. |
// Returns true if the request is bypassed by all configured data reduction |