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

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

Issue 473723002: Update data reduction proxy statistics prefs less often on desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tooManyWritesPatch
Patch Set: Undo BUILD.gn and fix aw_browser_context Created 6 years, 4 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/browser/data_reduction_proxy_settings.h
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_settings.h b/components/data_reduction_proxy/browser/data_reduction_proxy_settings.h
index 804023bc2ac076c18fc9a074a0995ead55067c54..03ccea64949bed3dbf4ded486e9108a8ea34620b 100644
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_settings.h
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_settings.h
@@ -12,10 +12,12 @@
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "base/prefs/pref_member.h"
#include "base/threading/thread_checker.h"
#include "components/data_reduction_proxy/browser/data_reduction_proxy_configurator.h"
#include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h"
+#include "components/data_reduction_proxy/browser/data_reduction_proxy_statistics_prefs.h"
#include "net/base/net_util.h"
#include "net/base/network_change_notifier.h"
#include "net/url_request/url_fetcher_delegate.h"
@@ -103,7 +105,6 @@ class DataReductionProxySettings
// |DataReductionProxySettings| instance.
void InitDataReductionProxySettings(
PrefService* prefs,
- PrefService* local_state_prefs,
net::URLRequestContextGetter* url_request_context_getter);
// Initializes the data reduction proxy with profile and local state prefs,
@@ -113,10 +114,14 @@ class DataReductionProxySettings
// TODO(marq): Remove when iOS supports the new interface above.
void InitDataReductionProxySettings(
PrefService* prefs,
- PrefService* local_state_prefs,
net::URLRequestContextGetter* url_request_context_getter,
DataReductionProxyConfigurator* configurator);
+ // Sets the |statistics_prefs_| weak pointer to be used for data reduction
bengr 2014/08/27 04:53:25 This isn't a weak pointer
megjablon 2014/08/28 20:44:07 Done.
+ // 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.
void SetOnDataReductionEnabledCallback(
@@ -190,7 +195,6 @@ class DataReductionProxySettings
// Virtualized for unit test support.
virtual PrefService* GetOriginalProfilePrefs();
- virtual PrefService* GetLocalStatePrefs();
// Sets the proxy configs, enabling or disabling the proxy according to
// the value of |enabled| and |alternative_enabled|. Use the alternative
@@ -307,7 +311,7 @@ class DataReductionProxySettings
BooleanPrefMember data_reduction_proxy_alternative_enabled_;
PrefService* prefs_;
- PrefService* local_state_prefs_;
+ DataReductionProxyStatisticsPrefs* statistics_prefs_;
net::URLRequestContextGetter* url_request_context_getter_;

Powered by Google App Engine
This is Rietveld 408576698