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

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 491753003: Domain Reliability: Don't upload when metrics reporting is off. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make sure constructor and destructor are on correct threads. 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.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 95200586873a60e0ed3758250cd7051ac878c2bf..e6d9f5d5a65b241f7a8b6361a7414b64b64ce0d9 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -691,7 +691,7 @@ void ProfileImpl::DoFinalInit() {
cache_max_size, media_cache_path, media_cache_max_size,
extensions_cookie_path, GetPath(), infinite_cache_path,
predictor_, session_cookie_mode, GetSpecialStoragePolicy(),
- CreateDomainReliabilityMonitor(),
+ CreateDomainReliabilityMonitor(local_state),
data_reduction_proxy_unavailable,
chrome_configurator.Pass(),
data_reduction_proxy_params.Pass());
@@ -1450,7 +1450,7 @@ PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() {
}
scoped_ptr<domain_reliability::DomainReliabilityMonitor>
-ProfileImpl::CreateDomainReliabilityMonitor() {
+ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) {
domain_reliability::DomainReliabilityService* service =
domain_reliability::DomainReliabilityServiceFactory::GetInstance()->
GetForBrowserContext(this);
@@ -1458,5 +1458,7 @@ ProfileImpl::CreateDomainReliabilityMonitor() {
return scoped_ptr<domain_reliability::DomainReliabilityMonitor>();
return service->CreateMonitor(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
+ local_state,
+ prefs::kMetricsReportingEnabled);
}

Powered by Google App Engine
This is Rietveld 408576698