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

Unified Diff: android_webview/browser/aw_browser_context.cc

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: Addressed sgurun comment Created 6 years, 3 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
« no previous file with comments | « android_webview/browser/aw_browser_context.h ('k') | chrome/browser/net/chrome_network_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/aw_browser_context.cc
diff --git a/android_webview/browser/aw_browser_context.cc b/android_webview/browser/aw_browser_context.cc
index 62482cab9745a8d9873f186da752e44c929099e7..4e68a47e790564bfe31cede05492943bba24092d 100644
--- a/android_webview/browser/aw_browser_context.cc
+++ b/android_webview/browser/aw_browser_context.cc
@@ -20,6 +20,7 @@
#include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h"
#include "components/data_reduction_proxy/browser/data_reduction_proxy_prefs.h"
#include "components/data_reduction_proxy/browser/data_reduction_proxy_settings.h"
+#include "components/data_reduction_proxy/browser/data_reduction_proxy_statistics_prefs.h"
#include "components/user_prefs/user_prefs.h"
#include "components/visitedlink/browser/visitedlink_master.h"
#include "content/public/browser/browser_thread.h"
@@ -33,6 +34,7 @@ using base::FilePath;
using content::BrowserThread;
using data_reduction_proxy::DataReductionProxyConfigService;
using data_reduction_proxy::DataReductionProxySettings;
+using data_reduction_proxy::DataReductionProxyStatisticsPrefs;
namespace android_webview {
@@ -104,6 +106,11 @@ void AwBrowserContext::PreMainMessageLoopRun() {
new DataReductionProxySettings(
new data_reduction_proxy::DataReductionProxyParams(
data_reduction_proxy::DataReductionProxyParams::kAllowed)));
+ data_reduction_proxy_statistics_prefs_.reset(
+ new DataReductionProxyStatisticsPrefs(
+ user_pref_service_.get(),
sgurun-gerrit only 2014/09/04 00:32:26 unfortunately this will not work, because we creat
megjablon 2014/09/04 18:28:51 Instead we are just not going to instantiate Data
+ base::MessageLoopProxy::current(),
+ base::TimeDelta()));
#endif
scoped_ptr<DataReductionProxyConfigService>
data_reduction_proxy_config_service(
@@ -209,9 +216,11 @@ void AwBrowserContext::CreateUserPrefServiceIfNecessary() {
if (data_reduction_proxy_settings_.get()) {
data_reduction_proxy_settings_->InitDataReductionProxySettings(
user_pref_service_.get(),
- user_pref_service_.get(),
GetRequestContext());
+ data_reduction_proxy_settings_->SetDataReductionProxyStatisticsPrefs(
+ data_reduction_proxy_statistics_prefs_.get());
+
data_reduction_proxy_settings_->SetDataReductionProxyEnabled(
data_reduction_proxy_enabled_);
}
« no previous file with comments | « android_webview/browser/aw_browser_context.h ('k') | chrome/browser/net/chrome_network_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698