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

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

Issue 119593002: Getting rid of temporary IsGetDefaultProfileAllowed instrumentation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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_manager.h ('k') | chrome/browser/ui/ash/chrome_shell_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index d89b3a445c8097253b5b7e9d55b20b808d37d88e..bdc0406a824588fd6fa0818c9b7f5a136085469d 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -213,27 +213,9 @@ void ProfileManager::NukeDeletedProfilesFromDisk() {
ProfilesToDelete().clear();
}
-namespace {
-
-bool s_allow_get_default_profile = false;
-
-} // namespace
-
-// static
-void ProfileManager::AllowGetDefaultProfile() {
- s_allow_get_default_profile = true;
-}
-
-// static
-bool ProfileManager::IsGetDefaultProfileAllowed() {
- return s_allow_get_default_profile;
-}
-
// static
// TODO(skuhne): Remove this method once all clients are migrated.
Profile* ProfileManager::GetDefaultProfile() {
- CHECK(s_allow_get_default_profile)
- << "GetDefaultProfile() called before allowed.";
ProfileManager* profile_manager = g_browser_process->profile_manager();
return profile_manager->GetDefaultProfile(profile_manager->user_data_dir_);
}
@@ -422,9 +404,6 @@ std::vector<Profile*> ProfileManager::GetLastOpenedProfiles(
Profile* ProfileManager::GetPrimaryUserProfile() {
#if defined(OS_CHROMEOS)
- // TODO(skuhne): Remove once GetDefaultProfile is removed.
- CHECK(s_allow_get_default_profile)
- << "GetPrimaryUserProfile() called before allowed.";
ProfileManager* profile_manager = g_browser_process->profile_manager();
if (!profile_manager->IsLoggedIn() || !chromeos::UserManager::IsInitialized())
return GetDefaultProfile();
@@ -438,9 +417,6 @@ Profile* ProfileManager::GetPrimaryUserProfile() {
Profile* ProfileManager::GetActiveUserProfile() {
#if defined(OS_CHROMEOS)
- // TODO(skuhne): Remove once GetDefaultProfile is removed.
- CHECK(s_allow_get_default_profile)
- << "GetActiveUserProfile() called before allowed.";
ProfileManager* profile_manager = g_browser_process->profile_manager();
if (!profile_manager->IsLoggedIn() || !chromeos::UserManager::IsInitialized())
return GetDefaultProfile();
« no previous file with comments | « chrome/browser/profiles/profile_manager.h ('k') | chrome/browser/ui/ash/chrome_shell_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698