Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc |
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc |
index 081c49f51c26d0f8f7b01d37b1d9fdd17739d8b7..156866c579e750d23f7c064b1506b9aef92d8318 100644 |
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc |
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc |
@@ -47,6 +47,9 @@ bool IsEnabledOnCommandLine() { |
namespace data_reduction_proxy { |
+const char kDataReductionPassThroughHeader[] = |
+ "X-PSA-Client-Options: v=1,m=1\nCache-Control: no-cache"; |
+ |
DataReductionProxySettings::DataReductionProxySettings() |
: unreachable_(false), |
allowed_(false), |
@@ -110,10 +113,16 @@ void DataReductionProxySettings::SetOnDataReductionEnabledCallback( |
on_data_reduction_proxy_enabled_.Run(IsDataReductionProxyEnabled()); |
} |
-bool DataReductionProxySettings::IsDataReductionProxyEnabled() { |
+bool DataReductionProxySettings::IsDataReductionProxyEnabled() const { |
return spdy_proxy_auth_enabled_.GetValue() || IsEnabledOnCommandLine(); |
} |
+bool DataReductionProxySettings::CanUseDataReductionProxy( |
+ const GURL& url) const { |
+ return url.is_valid() && (url.scheme() == url::kHttpScheme) && |
Alexei Svitkine (slow)
2015/02/23 19:13:16
Nit: No need for parens around the == cond.
Not at Google. Contact bengr
2015/02/23 20:38:59
Done.
|
+ IsDataReductionProxyEnabled(); |
+} |
+ |
bool |
DataReductionProxySettings::IsDataReductionProxyAlternativeEnabled() const { |
return data_reduction_proxy_alternative_enabled_.GetValue(); |