| Index: components/data_reduction_proxy/core/common/lofi_decider.h
|
| diff --git a/components/data_reduction_proxy/core/common/lofi_decider.h b/components/data_reduction_proxy/core/common/lofi_decider.h
|
| index dfe484c6681a726ec5fa5e629013cbbc71fc7934..727b87b59927fe34b9e8bf159cdd1a54dd2aff48 100644
|
| --- a/components/data_reduction_proxy/core/common/lofi_decider.h
|
| +++ b/components/data_reduction_proxy/core/common/lofi_decider.h
|
| @@ -8,6 +8,10 @@
|
| #include "base/macros.h"
|
| #include "net/url_request/url_request.h"
|
|
|
| +namespace net {
|
| +class HttpRequestHeaders;
|
| +}
|
| +
|
| namespace data_reduction_proxy {
|
|
|
| // Interface to determine if a request should be made for a low fidelity version
|
| @@ -17,9 +21,16 @@ class LoFiDecider {
|
| virtual ~LoFiDecider() {}
|
|
|
| // Returns true when Lo-Fi mode is on for the given |request|. This means the
|
| - // Lo-Fi header should be added to the given request, unless the user is in
|
| - // in the Lo-Fi control group.
|
| + // Lo-Fi header should be added to the given request.
|
| virtual bool IsUsingLoFiMode(const net::URLRequest& request) const = 0;
|
| +
|
| + // Returns true when Lo-Fi mode is on for the given |request|. If the
|
| + // |request| is using Lo-Fi mode, adds the "q=low" directive to the |headers|.
|
| + // If the user is in the experiment control group and Lo-Fi is on, adds the
|
| + // experiment directive "exp=lofi_active_control".
|
| + virtual bool MaybeAddLoFiDirectiveToHeaders(
|
| + const net::URLRequest& request,
|
| + net::HttpRequestHeaders* headers) const = 0;
|
| };
|
|
|
| } // namespace data_reduction_proxy
|
|
|