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

Unified Diff: chrome/test/base/testing_profile.cc

Issue 19482003: ShortcutManager constructor: Added DCHECK for UI thread. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add the same check to TestingProfile::Init. Created 7 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/apps/shortcut_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/testing_profile.cc
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index 3d9511da7f89dafb7b66d242aaf93e12a123a89b..f0240b500a16200fb7fb8ab539c6f705a38d6a24 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -283,6 +283,11 @@ void TestingProfile::CreateTempProfileDir() {
}
void TestingProfile::Init() {
+ // If threads have been initialized, we should be on the UI thread.
+ DCHECK(
+ !content::BrowserThread::IsWellKnownThread(content::BrowserThread::UI) ||
+ content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+
// Normally this would happen during browser startup, but for tests
// we need to trigger creation of Profile-related services.
ChromeBrowserMainExtraPartsProfiles::
« no previous file with comments | « chrome/browser/apps/shortcut_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698