Chromium Code Reviews| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h |
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h |
| index 141a09b6fb89bd36f55e5f3f3fedd2505fade0f5..721eff2afab0882c3138e4c08b7013c9a2585928 100644 |
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h |
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h |
| @@ -18,6 +18,7 @@ |
| #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.h" |
| #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.h" |
| #include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate.h" |
| +#include "components/data_reduction_proxy/core/common/lofi_decider.h" |
| namespace base { |
| class Value; |
| @@ -87,6 +88,9 @@ class DataReductionProxyIOData : public DataReductionProxyEventStorageDelegate { |
| // Applies a serialized Data Reduction Proxy configuration. |
| void SetDataReductionProxyConfiguration(const std::string& serialized_config); |
| + // Returns true when Lo-Fi mode should be activated. |
|
bengr
2015/10/12 21:06:41
Please say more about what Lo-Fi mode is:
// Retu
megjablon
2015/10/12 23:08:05
Done.
|
| + bool ShouldEnableLoFiMode(const net::URLRequest& request); |
| + |
| // Sets Lo-Fi mode off in |config_|. |
| void SetLoFiModeOff(); |
| @@ -162,6 +166,12 @@ class DataReductionProxyIOData : public DataReductionProxyEventStorageDelegate { |
| debug_ui_service_= ui_service.Pass(); |
| } |
| + LoFiDecider* lofi_decider() const { return lofi_decider_.get(); } |
| + |
| + void set_lofi_decider(scoped_ptr<LoFiDecider> lofi_decider) const { |
| + lofi_decider_ = lofi_decider.Pass(); |
| + } |
| + |
| private: |
| friend class TestDataReductionProxyIOData; |
| FRIEND_TEST_ALL_PREFIXES(DataReductionProxyIODataTest, TestConstruction); |
| @@ -199,6 +209,9 @@ class DataReductionProxyIOData : public DataReductionProxyEventStorageDelegate { |
| // interstitials. |
| mutable scoped_ptr<DataReductionProxyDebugUIService> debug_ui_service_; |
| + // Handles getting if a request is in Lo-Fi mode. |
| + mutable scoped_ptr<LoFiDecider> lofi_decider_; |
| + |
| // Creates Data Reduction Proxy-related events for logging. |
| scoped_ptr<DataReductionProxyEventCreator> event_creator_; |