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

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

Issue 1127893002: Add DataReductionProxyExperimentsStats and UMA for measuring potentially non-compressed bytes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test failures Created 5 years, 7 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_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 d68001f63f88e98cd5db66e1de270c8108fcca34..fbfce47c2317a4aaf63168ab2bbd700113b4eedf 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
@@ -34,6 +34,7 @@ class DataReductionProxyConfig;
class DataReductionProxyConfigServiceClient;
class DataReductionProxyConfigurator;
class DataReductionProxyEventCreator;
+class DataReductionProxyExperimentsStats;
class DataReductionProxyService;
// Contains and initializes all Data Reduction Proxy objects that operate on
@@ -60,7 +61,8 @@ class DataReductionProxyIOData : public DataReductionProxyEventStorageDelegate {
void ShutdownOnUIThread();
// Sets the Data Reduction Proxy service after it has been created.
- void SetDataReductionProxyService(
+ // Virtual for testing.
+ virtual void SetDataReductionProxyService(
base::WeakPtr<DataReductionProxyService> data_reduction_proxy_service);
void RetrieveConfig();
@@ -124,6 +126,10 @@ class DataReductionProxyIOData : public DataReductionProxyEventStorageDelegate {
return config_client_.get();
}
+ DataReductionProxyExperimentsStats* experiments_stats() const {
+ return experiments_stats_.get();
+ }
+
net::ProxyDelegate* proxy_delegate() const {
return proxy_delegate_.get();
}
@@ -165,6 +171,9 @@ class DataReductionProxyIOData : public DataReductionProxyEventStorageDelegate {
// Records that the data reduction proxy is unreachable or not.
void SetUnreachable(bool unreachable);
+ // Stores an int64 value in preferences storage.
+ void SetInt64Pref(const std::string& pref_path, int64 value);
+
// The type of Data Reduction Proxy client.
Client client_;
@@ -197,6 +206,9 @@ class DataReductionProxyIOData : public DataReductionProxyEventStorageDelegate {
// Requests new Data Reduction Proxy configurations from a remote service.
scoped_ptr<DataReductionProxyConfigServiceClient> config_client_;
+ // Used to track stats for experiments.
+ scoped_ptr<DataReductionProxyExperimentsStats> experiments_stats_;
+
// A net log.
net::NetLog* net_log_;

Powered by Google App Engine
This is Rietveld 408576698