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

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: 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
« 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 014b6a888dab3094253f522d672c4c8068433adb..ecd8e7a648a4a1b0cd8821610b4aa228e362c1a9 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -15,6 +15,7 @@
#include "base/strings/string_util.h"
#include "base/threading/sequenced_worker_pool.h"
#include "base/threading/worker_pool.h"
+#include "chrome/browser/browser_process.h"
noms (inactive) 2014/08/25 16:57:10 Is this include needed?
Deprecated (see juliatuttle) 2014/08/25 17:04:49 Oh, not anymore, thanks.
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
@@ -116,6 +117,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 +172,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 +603,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