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

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: Thestig comment and test fix Created 5 years, 10 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: 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 a0fcb0524d223e805c3f6f3f78a525563e2779b6..98676a7fee6bca07fd55b8be6f18e6ddccc23430 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
@@ -103,6 +103,14 @@ class DataReductionProxyParams {
// mode.
static bool IsLoFiEnabled();
+ // Returns true if this client has the command line switch to show
+ // interstitials for data reduction proxy bypasses.
+ static bool WarnIfNoDataReductionProxy();
+
+ // Returns true if the Data Reduction Proxy supports the scheme of the
+ // provided |url|.
+ 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
@@ -148,8 +156,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;
@@ -159,8 +167,8 @@ 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(
+ // does not assign min_retry_delay. Virtual for testing.
+ virtual bool AreDataReductionProxiesBypassed(
const net::URLRequest& request,
const net::ProxyConfig& data_reduction_proxy_config,
base::TimeDelta* min_retry_delay) const;

Powered by Google App Engine
This is Rietveld 408576698