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

Unified Diff: chrome/browser/profiles/profile_impl_io_data.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: 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: chrome/browser/profiles/profile_impl_io_data.cc
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index a8ec6eebf327fa884a93a578fe51721a0ee958a1..71c16dfdef0d0ba2190be83041a51e457c501435 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -55,6 +55,7 @@
#include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
#include "components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.h"
#include "components/data_reduction_proxy/browser/data_reduction_proxy_protocol.h"
+#include "components/data_reduction_proxy/browser/data_reduction_proxy_statistics_prefs.h"
#include "components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.h"
#include "components/data_reduction_proxy/common/data_reduction_proxy_pref_names.h"
#endif // defined(SPDY_PROXY_AUTH_ORIGIN)
@@ -123,25 +124,27 @@ ProfileImplIOData::Handle::~Handle() {
}
void ProfileImplIOData::Handle::Init(
- const base::FilePath& cookie_path,
- const base::FilePath& channel_id_path,
- const base::FilePath& cache_path,
- int cache_max_size,
- const base::FilePath& media_cache_path,
- int media_cache_max_size,
- const base::FilePath& extensions_cookie_path,
- const base::FilePath& profile_path,
- const base::FilePath& infinite_cache_path,
- chrome_browser_net::Predictor* predictor,
- content::CookieStoreConfig::SessionCookieMode session_cookie_mode,
- storage::SpecialStoragePolicy* special_storage_policy,
- scoped_ptr<domain_reliability::DomainReliabilityMonitor>
- domain_reliability_monitor,
- const base::Callback<void(bool)>& data_reduction_proxy_unavailable,
- scoped_ptr<DataReductionProxyChromeConfigurator>
- data_reduction_proxy_chrome_configurator,
- scoped_ptr<data_reduction_proxy::DataReductionProxyParams>
- data_reduction_proxy_params) {
+ const base::FilePath& cookie_path,
bengr 2014/08/27 04:53:24 Fix indent down to lone 147
megjablon 2014/08/28 20:44:06 Done.
+ const base::FilePath& channel_id_path,
+ const base::FilePath& cache_path,
+ int cache_max_size,
+ const base::FilePath& media_cache_path,
+ int media_cache_max_size,
+ const base::FilePath& extensions_cookie_path,
+ const base::FilePath& profile_path,
+ const base::FilePath& infinite_cache_path,
+ chrome_browser_net::Predictor* predictor,
+ content::CookieStoreConfig::SessionCookieMode session_cookie_mode,
+ storage::SpecialStoragePolicy* special_storage_policy,
+ scoped_ptr<domain_reliability::DomainReliabilityMonitor>
+ domain_reliability_monitor,
+ const base::Callback<void(bool)>& data_reduction_proxy_unavailable,
+ scoped_ptr<DataReductionProxyChromeConfigurator>
+ data_reduction_proxy_chrome_configurator,
+ scoped_ptr<data_reduction_proxy::DataReductionProxyParams>
+ data_reduction_proxy_params,
+ scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs>
+ data_reduction_proxy_statistics_prefs) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!io_data_->lazy_params_);
DCHECK(predictor);
@@ -181,6 +184,8 @@ void ProfileImplIOData::Handle::Init(
data_reduction_proxy_chrome_configurator.Pass();
io_data_->data_reduction_proxy_params_ =
data_reduction_proxy_params.Pass();
+ io_data_->data_reduction_proxy_statistics_prefs_ =
+ data_reduction_proxy_statistics_prefs.Pass();
#endif // defined(SPDY_PROXY_AUTH_ORIGIN)
}
@@ -450,6 +455,8 @@ void ProfileImplIOData::InitializeInternal(
data_reduction_proxy_usage_stats_.get());
network_delegate()->set_data_reduction_proxy_auth_request_handler(
data_reduction_proxy_auth_request_handler_.get());
+ network_delegate()->set_data_reduction_proxy_statistics_prefs(
+ data_reduction_proxy_statistics_prefs_.get());
network_delegate()->set_on_resolve_proxy_handler(
base::Bind(data_reduction_proxy::OnResolveProxyHandler));
network_delegate()->set_proxy_config_getter(

Powered by Google App Engine
This is Rietveld 408576698