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

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

Issue 888713002: DataReductionProxyStatisticsPrefs should support WeakPtr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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 911668705fed33cf74bf7068c2e001c537e635ec..f35cb936fff0132be7f784268e4514ef3f799161 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
@@ -83,14 +83,25 @@ class DataReductionProxySettings
// |DataReductionProxySettings| instance.
void InitDataReductionProxySettings(
PrefService* prefs,
+ scoped_ptr<DataReductionProxyStatisticsPrefs> statistics_prefs,
net::URLRequestContextGetter* url_request_context_getter,
net::NetLog* net_log,
DataReductionProxyEventStore* event_store);
- // Sets the |statistics_prefs_| to be used for data reduction proxy pref reads
- // and writes.
+ // Constructs statistics prefs. This is not necessary if a valid statistics
+ // prefs is passed into the constructor.
bengr 2015/02/04 23:39:11 Is it safe to call it if a valid statistics prefs
megjablon 2015/02/06 23:40:42 Done.
+ void EnableCompressionStatisticsLogging(
+ PrefService* prefs,
+ scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
+ const base::TimeDelta& commit_delay);
+
+ // Used for testing.
void SetDataReductionProxyStatisticsPrefs(
bengr 2015/02/04 23:39:11 Does this need to be public? Also, move this down
megjablon 2015/02/06 23:40:42 Yes, it needs to be public since DRPSettingsTestBa
- DataReductionProxyStatisticsPrefs* statistics_prefs);
+ scoped_ptr<DataReductionProxyStatisticsPrefs> statistics_prefs);
+
+ DataReductionProxyStatisticsPrefs* statistics_prefs() const {
+ return statistics_prefs_.get();
+ }
// Sets the |on_data_reduction_proxy_enabled_| callback and runs to register
// the DataReductionProxyEnabled synthetic field trial.
@@ -283,7 +294,7 @@ class DataReductionProxySettings
BooleanPrefMember data_reduction_proxy_alternative_enabled_;
PrefService* prefs_;
- DataReductionProxyStatisticsPrefs* statistics_prefs_;
+ scoped_ptr<DataReductionProxyStatisticsPrefs> statistics_prefs_;
net::URLRequestContextGetter* url_request_context_getter_;

Powered by Google App Engine
This is Rietveld 408576698