Chromium Code Reviews| 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 |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1afd5f9ddf1ee9b8cc31899c9ad15d9d09a3d85f |
| --- /dev/null |
| +++ b/components/data_reduction_proxy/content/browser/content_data_reduction_proxy_lofi_helper.cc |
| @@ -0,0 +1,28 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "components/data_reduction_proxy/content/browser/content_data_reduction_proxy_lofi_helper.h" |
| + |
| +#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h" |
| +#include "content/public/browser/resource_request_info.h" |
| +#include "net/url_request/url_request.h" |
| + |
| +namespace data_reduction_proxy { |
| + |
| +ContentDataReductionProxyLoFiHelper::ContentDataReductionProxyLoFiHelper() {} |
| + |
| +ContentDataReductionProxyLoFiHelper::~ContentDataReductionProxyLoFiHelper() {} |
| + |
| +bool ContentDataReductionProxyLoFiHelper::ShouldUseLoFi( |
| + const net::URLRequest* request) const { |
| + // TODO: will be check of IsLoFi ResourceRequestInfo && |
| + // (params::IsLoFiOnViaFlags() || |
| + // params::IsIncludedInLoFiEnabledFieldTrial()) |
|
bengr
2015/10/03 00:01:29
Why isn't this done? It seems pretty fundamental.
megjablon
2015/10/05 20:22:58
IsLoFi isn't in ResourceRequestInfo yet since it l
|
| + // 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". |
| + return false; |
| +} |
| + |
| +} // namespace data_reduction_roxy |