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

Unified Diff: chrome/browser/profiles/profile_impl_io_data.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: Fix a last couple of nits 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
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | components/domain_reliability.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 11a6fae2fac02fb22ae5c42d4054b88721eb8ee1..a8ec6eebf327fa884a93a578fe51721a0ee958a1 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -116,6 +116,9 @@ ProfileImplIOData::Handle::~Handle() {
if (io_data_->http_server_properties_manager_)
io_data_->http_server_properties_manager_->ShutdownOnPrefThread();
+ if (io_data_->domain_reliability_monitor_)
+ io_data_->domain_reliability_monitor_->DestroyReportingPref();
+
io_data_->ShutdownOnUIThread(GetAllContextGetters().Pass());
}
@@ -168,6 +171,8 @@ void ProfileImplIOData::Handle::Init(
io_data_->domain_reliability_monitor_ = domain_reliability_monitor.Pass();
io_data_->InitializeMetricsEnabledStateOnUIThread();
+ if (io_data_->domain_reliability_monitor_)
+ io_data_->domain_reliability_monitor_->MoveToNetworkThread();
#if defined(SPDY_PROXY_AUTH_ORIGIN)
io_data_->data_reduction_proxy_unavailable_callback_ =
@@ -597,12 +602,11 @@ void ProfileImplIOData::InitializeInternal(
details));
if (domain_reliability_monitor_) {
- domain_reliability_monitor_->Init(
- main_context,
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
- domain_reliability_monitor_->AddBakedInConfigs();
- network_delegate()->set_domain_reliability_monitor(
- domain_reliability_monitor_.get());
+ domain_reliability::DomainReliabilityMonitor* monitor =
+ domain_reliability_monitor_.get();
+ monitor->InitURLRequestContext(main_context);
+ monitor->AddBakedInConfigs();
+ network_delegate()->set_domain_reliability_monitor(monitor);
}
lazy_params_.reset();
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | components/domain_reliability.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698