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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.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_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 c8b06e8c64d4d47e09a832cf95c806e87135ed9b..818c91b36527c7f90803ab1417b205619f8a6c5f 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
@@ -118,8 +118,8 @@ class DataReductionProxySettings
// Sets the |statistics_prefs_| to be used for data reduction proxy pref reads
// and writes.
- void SetDataReductionProxyStatisticsPrefs(
- DataReductionProxyStatisticsPrefs* statistics_prefs);
+ void SetDataReductionProxyStatistics(
+ DataReductionProxyStatistics* drp_statistics);
bengr 2014/10/17 23:40:27 Don't use abbreviations like "drp". Can you just c
hush (inactive) 2014/10/18 02:09:15 Done.
// Sets the |on_data_reduction_proxy_enabled_| callback and runs to register
// the DataReductionProxyEnabled synthetic field trial.
@@ -302,7 +302,15 @@ class DataReductionProxySettings
BooleanPrefMember data_reduction_proxy_alternative_enabled_;
PrefService* prefs_;
- DataReductionProxyStatisticsPrefs* statistics_prefs_;
+ // This class manages the life time of |dummy_drp_statistics_| which is the
+ // default if the embedder does not call SetDataReductionProxyStatistics().
+ // The embedder who calls SetDataReductionProxyStatistics() manages the life
+ // time of |drp_statistics_|. In the case of chrome, ProfileImplIOData manages
+ // its lifetime.
+ // drp_statistics_ will be intialized as dummy_drp_statistics_ until
+ // SetDataReductionProxyStatistics is called.
+ scoped_ptr<DataReductionProxyStatistics> dummy_drp_statistics_;
+ DataReductionProxyStatistics* drp_statistics_;
bengr 2014/10/17 23:40:27 I don't understand why you need two statistics poi
hush (inactive) 2014/10/18 01:54:29 From my discussion with Selim yesterday, I think o
net::URLRequestContextGetter* url_request_context_getter_;

Powered by Google App Engine
This is Rietveld 408576698