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

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

Issue 2257533003: Adding a previews object, PreviewsDataSavings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bengr comment Created 4 years, 3 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
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 b15bf9c896918c2ce73ae603c17e94c0c09c6bda..1f1905c4eaef469f5d080478a8bcd4d6bc3479e0 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,21 +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/data_reduction_proxy/core/common/data_savings_recorder.h"
#include "components/prefs/pref_member.h"
#include "url/gurl.h"
class PrefService;
namespace data_reduction_proxy {
class DataReductionProxyConfig;
class DataReductionProxyEventStore;
class DataReductionProxyIOData;
@@ -64,30 +64,32 @@ enum LoFiImplicitOptOutAction {
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,
- public DataSaverStatus {
+ public DataSavingsRecorder {
public:
typedef base::Callback<bool(const std::string&, const std::string&)>
SyntheticFieldTrialRegistrationCallback;
DataReductionProxySettings();
virtual ~DataReductionProxySettings();
- // DataSaverStatus implementation:
- bool IsDataSaverEnabled() const override;
+ // DataSavingsRecorder implementation:
+ bool UpdateDataSavings(const std::string& data_usage_host,
+ int64_t data_used,
+ int64_t original_size) 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);

Powered by Google App Engine
This is Rietveld 408576698