| Index: components/data_reduction_proxy/core/common/data_reduction_proxy_lofi_helper.h
|
| diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_lofi_helper.h b/components/data_reduction_proxy/core/common/data_reduction_proxy_lofi_helper.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c5a4c391d9f0345d839031c8ea2a1a25f082a61b
|
| --- /dev/null
|
| +++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_lofi_helper.h
|
| @@ -0,0 +1,38 @@
|
| +// 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.
|
| +
|
| +#ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_LOFI_HELPER_H_
|
| +#define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_LOFI_HELPER_H_
|
| +
|
| +#include "base/macros.h"
|
| +#include "net/url_request/url_request.h"
|
| +
|
| +namespace data_reduction_proxy {
|
| +
|
| +// The LoFi state which determines whether to add the LoFi header. Must stay
|
| +// in sync with the enum in navigation_params.h.
|
| +enum LoFiState {
|
| + // Request a LoFi version of the resource.
|
| + LOFI_ON = 0,
|
| + // Request a normal (non-LoFi) version of the resource.
|
| + LOFI_OFF,
|
| + // Let the browser process decide whether or not to request the LoFi version.
|
| + LOFI_DEFAULT,
|
| +};
|
| +
|
| +// An interface for the ContentDataReductionProxyLoFiHelper which creates
|
| +// a DataReductionProxyLoFiHelper that handles getting and setting
|
| +// the Lo-Fi UserData on a request.
|
| +class DataReductionProxyLoFiHelper {
|
| + public:
|
| + virtual ~DataReductionProxyLoFiHelper() {}
|
| +
|
| + virtual LoFiState lofi_state(net::URLRequest* request) const = 0;
|
| + virtual void set_lofi_state(net::URLRequest* request,
|
| + LoFiState lofi_state) = 0;
|
| +};
|
| +
|
| +} // namespace data_reduction_proxy
|
| +
|
| +#endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_LOFI_HELPER_H_
|
|
|