| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h
|
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h
|
| index 7173f526ed2d5dbe2a0af080c387629363e99afc..4f6a7160f445e6949998a4ae068bae428ca0c7a6 100644
|
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h
|
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h
|
| @@ -11,20 +11,21 @@
|
| #include <string>
|
| #include <vector>
|
|
|
| #include "base/callback.h"
|
| #include "base/compiler_specific.h"
|
| #include "base/gtest_prod_util.h"
|
| #include "base/macros.h"
|
| #include "base/threading/thread_checker.h"
|
| #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.h"
|
| #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_service_observer.h"
|
| +#include "components/data_reduction_proxy/core/common/data_saver_status.h"
|
| #include "components/prefs/pref_member.h"
|
| #include "url/gurl.h"
|
|
|
| class PrefService;
|
|
|
| namespace data_reduction_proxy {
|
|
|
| class DataReductionProxyConfig;
|
| class DataReductionProxyEventStore;
|
| class DataReductionProxyIOData;
|
| @@ -62,28 +63,32 @@ enum LoFiImplicitOptOutAction {
|
| // in metrics/histograms/histograms.xml.
|
| enum DataReductionSettingsEnabledAction {
|
| DATA_REDUCTION_SETTINGS_ACTION_OFF_TO_ON = 0,
|
| DATA_REDUCTION_SETTINGS_ACTION_ON_TO_OFF,
|
| DATA_REDUCTION_SETTINGS_ACTION_BOUNDARY,
|
| };
|
|
|
| // Central point for configuring the data reduction proxy.
|
| // This object lives on the UI thread and all of its methods are expected to
|
| // be called from there.
|
| -class DataReductionProxySettings : public DataReductionProxyServiceObserver {
|
| +class DataReductionProxySettings : public DataReductionProxyServiceObserver,
|
| + public DataSaverStatus {
|
| public:
|
| typedef base::Callback<bool(const std::string&, const std::string&)>
|
| SyntheticFieldTrialRegistrationCallback;
|
|
|
| DataReductionProxySettings();
|
| virtual ~DataReductionProxySettings();
|
|
|
| + // DataSaverStatus implementation:
|
| + bool IsDataSaverEnabled() const override;
|
| +
|
| // Initializes the Data Reduction Proxy with the name of the preference that
|
| // controls enabling it, profile prefs and a |DataReductionProxyIOData|. The
|
| // caller must ensure that all parameters remain alive for the lifetime of
|
| // the |DataReductionProxySettings| instance.
|
| void InitDataReductionProxySettings(
|
| const std::string& data_reduction_proxy_enabled_pref_name,
|
| PrefService* prefs,
|
| DataReductionProxyIOData* io_data,
|
| std::unique_ptr<DataReductionProxyService> data_reduction_proxy_service);
|
|
|
|
|