| 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..534e60d547b4ea1b180cf60ae5bd5b8e694556ab 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 &&
|
| + IsDataReductionProxyEnabled();
|
| +}
|
| +
|
| bool
|
| DataReductionProxySettings::IsDataReductionProxyAlternativeEnabled() const {
|
| return data_reduction_proxy_alternative_enabled_.GetValue();
|
|
|