| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc
|
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc
|
| index 24be61b0998bdf0d2ccf1d351a23bc011451d626..55ebdc803a65da3c50fd890f2339de26524a0201 100644
|
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc
|
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc
|
| @@ -8,6 +8,7 @@
|
|
|
| #include "base/bind.h"
|
| #include "base/command_line.h"
|
| +#include "base/metrics/field_trial.h"
|
| #include "base/single_thread_task_runner.h"
|
| #include "base/strings/string_split.h"
|
| #include "base/strings/string_tokenizer.h"
|
| @@ -161,13 +162,11 @@ void DataReductionProxyRequestOptions::UpdateVersion() {
|
| void DataReductionProxyRequestOptions::MayRegenerateHeaderBasedOnLoFi(
|
| const net::URLRequest* request) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| + DCHECK(!request || !(request->lofi_state() == net::LOFI_DEFAULT));
|
|
|
| - if (!data_reduction_proxy_config_)
|
| - return;
|
| -
|
| - bool lofi_now_enabled =
|
| - !(request && request->load_flags() & net::LOAD_BYPASS_CACHE) &&
|
| - data_reduction_proxy_config_->ShouldUseLoFiHeaderForRequests();
|
| + bool lofi_now_enabled = request && request->lofi_state() == net::LOFI_ON &&
|
| + !(base::FieldTrialList::FindFullName(
|
| + params::GetLoFiFieldTrialName()) == "Control");
|
|
|
| // Lo-Fi was not enabled, but now is. Add the header option.
|
| if (lofi_.empty() && lofi_now_enabled) {
|
|
|