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

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

Issue 896713003: Revert of DataReductionProxyStatisticsPrefs should support WeakPtr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 61539beb9cbda06e13a9aef866f5ebe7de79fe64..911668705fed33cf74bf7068c2e001c537e635ec 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
@@ -36,7 +36,6 @@
namespace data_reduction_proxy {
class DataReductionProxyEventStore;
-class DataReductionProxyStatisticsPrefs;
// The number of days of bandwidth usage statistics that are tracked.
const unsigned int kNumDaysInHistory = 60;
@@ -84,19 +83,14 @@
// |DataReductionProxySettings| instance.
void InitDataReductionProxySettings(
PrefService* prefs,
- scoped_ptr<DataReductionProxyStatisticsPrefs> statistics_prefs,
net::URLRequestContextGetter* url_request_context_getter,
net::NetLog* net_log,
DataReductionProxyEventStore* event_store);
- // Constructs statistics prefs. This should not be called if a valid
- // statistics prefs is passed into the constructor.
- void EnableCompressionStatisticsLogging(
- PrefService* prefs,
- scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
- const base::TimeDelta& commit_delay);
-
- base::WeakPtr<DataReductionProxyStatisticsPrefs> statistics_prefs();
+ // Sets the |statistics_prefs_| to be used for data reduction proxy pref reads
+ // and writes.
+ void SetDataReductionProxyStatisticsPrefs(
+ DataReductionProxyStatisticsPrefs* statistics_prefs);
// Sets the |on_data_reduction_proxy_enabled_| callback and runs to register
// the DataReductionProxyEnabled synthetic field trial.
@@ -168,10 +162,6 @@
DataReductionProxyEventStore* GetEventStore() const {
return event_store_;
}
-
- // Used for testing.
- void SetDataReductionProxyStatisticsPrefs(
- scoped_ptr<DataReductionProxyStatisticsPrefs> statistics_prefs);
protected:
void InitPrefMembers();
@@ -293,7 +283,7 @@
BooleanPrefMember data_reduction_proxy_alternative_enabled_;
PrefService* prefs_;
- scoped_ptr<DataReductionProxyStatisticsPrefs> statistics_prefs_;
+ DataReductionProxyStatisticsPrefs* statistics_prefs_;
net::URLRequestContextGetter* url_request_context_getter_;

Powered by Google App Engine
This is Rietveld 408576698