| Index: components/data_reduction_proxy/content/browser/content_data_reduction_proxy_lofi_helper.cc
|
| diff --git a/components/data_reduction_proxy/content/browser/content_data_reduction_proxy_lofi_helper.cc b/components/data_reduction_proxy/content/browser/content_data_reduction_proxy_lofi_helper.cc
|
| index 1afd5f9ddf1ee9b8cc31899c9ad15d9d09a3d85f..9458d828c406315d1d436d9fb7d9691185fb1a39 100644
|
| --- a/components/data_reduction_proxy/content/browser/content_data_reduction_proxy_lofi_helper.cc
|
| +++ b/components/data_reduction_proxy/content/browser/content_data_reduction_proxy_lofi_helper.cc
|
| @@ -16,12 +16,16 @@ ContentDataReductionProxyLoFiHelper::~ContentDataReductionProxyLoFiHelper() {}
|
|
|
| bool ContentDataReductionProxyLoFiHelper::ShouldUseLoFi(
|
| const net::URLRequest* request) const {
|
| - // TODO: will be check of IsLoFi ResourceRequestInfo &&
|
| - // (params::IsLoFiOnViaFlags() ||
|
| - // params::IsIncludedInLoFiEnabledFieldTrial())
|
| - // The Lo-Fi directive should not be added for users in the Lo-Fi field
|
| - // trial "Control" group. Check that the user is in a group that should
|
| - // get "q=low".
|
| + const content::ResourceRequestInfo* request_info =
|
| + content::ResourceRequestInfo::ForRequest(request);
|
| + if (request_info) {
|
| + // The Lo-Fi directive should not be added for users in the Lo-Fi field
|
| + // trial "Control" group unless he or she turns on Lo-Fi through a flag.
|
| + // Check that the user is in a group that should get "q=low".
|
| + return request_info->IsUsingLoFi() &&
|
| + (params::IsLoFiOnViaFlags() ||
|
| + params::IsIncludedInLoFiEnabledFieldTrial());
|
| + }
|
| return false;
|
| }
|
|
|
|
|