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

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

Issue 651443005: Use no-op statistics collecting object for WebView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor2
Patch Set: Selim and Ben's comments Created 6 years, 2 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_statistics_prefs.h
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics_prefs.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics_prefs.h
index 97662957e1e8825fde60a6011ca27d54e73b24a3..5b8eb3376f99060d7b577dfb93f727b2f2c040ec 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics_prefs.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics_prefs.h
@@ -12,6 +12,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
+#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.h"
class PrefService;
@@ -28,7 +29,7 @@ namespace data_reduction_proxy {
// |delay| amount of time. If |delay| is zero, the delayed pref service writes
// directly to the PrefService and does not store the prefs in memory. All
// prefs must be stored and read on the UI thread.
-class DataReductionProxyStatisticsPrefs {
+class DataReductionProxyStatisticsPrefs : public DataReductionProxyStatistics {
public:
// Constructs a data reduction proxy delayed pref service object using
// |pref_service|. Writes prefs to |pref_service| after |delay|
@@ -39,25 +40,26 @@ public:
PrefService* pref_service,
scoped_refptr<base::SequencedTaskRunner> task_runner,
const base::TimeDelta& delay);
- ~DataReductionProxyStatisticsPrefs();
-
- // Loads all data_reduction_proxy::prefs into the |pref_map_| and
- // |list_pref_map_|.
- void Init();
+ virtual ~DataReductionProxyStatisticsPrefs();
// Gets the int64 pref at |pref_path| from the |DataReductionProxyPrefMap|.
- int64 GetInt64(const char* pref_path);
+ virtual int64 GetInt64(const char* pref_path) override;
// Updates the pref value in the |DataReductionProxyPrefMap| map.
// The pref is later written to |pref service_|.
- void SetInt64(const char* pref_path, int64 pref_value);
+ virtual void SetInt64(const char* pref_path, int64 pref_value) override;
// Gets the pref list at |pref_path| from the |DataReductionProxyPrefMap|.
- base::ListValue* GetList(const char* pref_path);
+ virtual base::ListValue* GetList(const char* pref_path) override;
// Writes the prefs stored in |DataReductionProxyPrefMap| and
// |DataReductionProxyListPrefMap| to |pref_service|.
- void WritePrefs();
+ virtual void WriteStats() override;
+
+ // Loads all data_reduction_proxy::prefs into the |pref_map_| and
+ // |list_pref_map_|.
+ // Visible for testing.
+ void Init();
hush (inactive) 2014/10/18 01:54:29 https://code.google.com/p/chromium/codesearch#chro
private:
typedef std::map<const char*, int64> DataReductionProxyPrefMap;

Powered by Google App Engine
This is Rietveld 408576698