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

Unified Diff: components/data_reduction_proxy/core/common/data_reduction_proxy_params.h

Issue 684223003: Data Reduction Proxy Interstitials (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding tests and addressing comments Created 6 years 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: 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..7a94682fc55c28dc53de0b1b8b711271e5680fd1 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,10 @@ 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 IsIncludedInBypassWarningTrial();
+
// 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 +139,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(
bengr 2014/12/29 18:45:43 As I mentioned previously, I'd prefer you find a w
megjablon 2014/12/30 23:40:01 Still need to keep virtual in order to override in
const net::URLRequest& request,
const net::ProxyConfig& data_reduction_proxy_config) const;
@@ -146,9 +150,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

Powered by Google App Engine
This is Rietveld 408576698