Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h

Issue 2255603002: Adding a DataSaverStatus interface to DataReductionProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding depending CL Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698