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

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

Issue 615083004: Use ThreadChecker rather than DCHECK_CURRENTLY_ON. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix 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
Index: chrome/browser/profiles/off_the_record_profile_impl.cc
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc
index 4df068db2e8ab59c96abf0b040accd2cc8430a1c..06ae0cfea9c38c15be30511fbbfe046752760f2a 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -109,6 +109,8 @@ OffTheRecordProfileImpl::OffTheRecordProfileImpl(Profile* real_profile)
}
void OffTheRecordProfileImpl::Init() {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+
// The construction of OffTheRecordProfileIOData::Handle needs the profile
// type returned by this->GetProfileType(). Since GetProfileType() is a
// virtual member function, we cannot call the function defined in the most
@@ -145,6 +147,9 @@ void OffTheRecordProfileImpl::Init() {
InitHostZoomMap();
+ // Make sure HostContentSettingsMap is created on the UI thread.
+ GetHostContentSettingsMap();
+
#if defined(ENABLE_PLUGINS)
ChromePluginServiceFilter::GetInstance()->RegisterResourceContext(
PluginPrefs::GetForProfile(this).get(),

Powered by Google App Engine
This is Rietveld 408576698