Chromium Code Reviews| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h |
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h |
| index 61539beb9cbda06e13a9aef866f5ebe7de79fe64..60d95e15b405f2f37899a3a6d4ef2a9c1dc6bc4b 100644 |
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h |
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h |
| @@ -109,7 +109,17 @@ class DataReductionProxySettings |
| DataReductionProxyConfigurator* configurator); |
| // Returns true if the proxy is enabled. |
| - bool IsDataReductionProxyEnabled(); |
| + bool IsDataReductionProxyEnabled() const; |
| + |
| + // Returns true if the proxy can be used for the given url. This method does |
| + // not take into account the proxy config or proxy retry list, so it can |
| + // return 'true' even when proxy will not be used. Specifically, if |
|
bengr
2015/02/20 01:19:25
"the proxy"
Not at Google. Contact bengr
2015/02/20 17:08:08
Done.
|
| + // another proxy configuration overrides use of data reduction proxy, or |
| + // if data reduction proxy is in proxy retry list, then data reduction proxy |
| + // will not be used, but this method will still return true. If this method |
| + // returns false, then we are guaranteed that data reduction proxy will not be |
| + // used. |
| + bool CanUseDataReductionProxy(const GURL& url) const; |
|
bengr
2015/02/20 01:19:25
Is this what we'll want to use going forward? Two
Not at Google. Contact bengr
2015/02/20 17:08:08
I think option 1 is a good one. We could always sh
Not at Google. Contact bengr
2015/02/20 18:43:38
Discussed in person. We need the "Open original im
|
| // Returns true if the alternative proxy is enabled. |
| bool IsDataReductionProxyAlternativeEnabled() const; |
| @@ -235,6 +245,8 @@ class DataReductionProxySettings |
| FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsTest, |
| TestIsProxyEnabledOrManaged); |
| FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsTest, |
| + TestCanUseDataReductionProxy); |
| + FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsTest, |
| TestContentLengths); |
| FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsTest, |
| TestGetDailyContentLengths); |