Chromium Code Reviews| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc |
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc |
| index 9fb4b00a99a573096e1060b1dfeec48ea29121a3..6219f3805b5db7643e00042c09bc722bb71428a6 100644 |
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc |
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc |
| @@ -25,6 +25,7 @@ |
| #include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h" |
| #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.h" |
| #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h" |
| +#include "net/base/load_flags.h" |
|
tbansal1
2015/10/13 17:12:02
Is this include needed?
megjablon
2015/10/15 03:44:05
Done.
|
| #include "net/log/net_log.h" |
| #include "net/url_request/http_user_agent_settings.h" |
| #include "net/url_request/static_http_user_agent_settings.h" |
| @@ -262,6 +263,15 @@ void DataReductionProxyIOData::SetDataReductionProxyConfiguration( |
| config_client_->ApplySerializedConfig(serialized_config); |
| } |
| +bool DataReductionProxyIOData::ShouldEnableLoFiMode( |
| + const net::URLRequest& request) { |
| + if (!config_ || (config_->IsBypassedByDataReductionProxyLocalRules( |
| + request, configurator_->GetProxyConfig()))) { |
| + return false; |
| + } |
| + return config_->ShouldEnableLoFiMode(request); |
| +} |
| + |
| void DataReductionProxyIOData::SetLoFiModeOff() { |
| config_->SetLoFiModeOff(); |
| } |