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

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

Issue 375413002: Replace chromeos::UserManager::Get() with chromeos::GetUserManager(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 5 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_io_data.cc ('k') | chrome/browser/profiles/profile_manager_unittest.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 845f33c818d4799b1e575f41689c06cb69a45972..470ecd49772f8d29a9e032655499e5d854839b8d 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -314,7 +314,7 @@ Profile* ProfileManager::GetPrimaryUserProfile() {
if (!profile_manager->IsLoggedIn() || !chromeos::UserManager::IsInitialized())
return profile_manager->GetActiveUserOrOffTheRecordProfileFromPath(
profile_manager->user_data_dir());
- chromeos::UserManager* manager = chromeos::UserManager::Get();
+ chromeos::UserManager* manager = chromeos::GetUserManager();
// Note: The ProfileHelper will take care of guest profiles.
return chromeos::ProfileHelper::Get()->GetProfileByUser(
manager->GetPrimaryUser());
@@ -334,7 +334,7 @@ Profile* ProfileManager::GetActiveUserProfile() {
profile_manager->user_data_dir());
}
- chromeos::UserManager* manager = chromeos::UserManager::Get();
+ chromeos::UserManager* manager = chromeos::GetUserManager();
const chromeos::User* user = manager->GetActiveUser();
// To avoid an endless loop (crbug.com/334098) we have to additionally check
// if the profile of the user was already created. If the profile was not yet
@@ -1036,7 +1036,7 @@ Profile* ProfileManager::GetActiveUserOrOffTheRecordProfileFromPath(
// if the login-profile switch is passed so that we can test this.
if (ShouldGoOffTheRecord(profile))
return profile->GetOffTheRecordProfile();
- DCHECK(!chromeos::UserManager::Get()->IsLoggedInAsGuest());
+ DCHECK(!chromeos::GetUserManager()->IsLoggedInAsGuest());
return profile;
}
@@ -1050,7 +1050,7 @@ Profile* ProfileManager::GetActiveUserOrOffTheRecordProfileFromPath(
Profile* profile = GetProfile(default_profile_dir);
// Some unit tests didn't initialize the UserManager.
if (chromeos::UserManager::IsInitialized() &&
- chromeos::UserManager::Get()->IsLoggedInAsGuest())
+ chromeos::GetUserManager()->IsLoggedInAsGuest())
return profile->GetOffTheRecordProfile();
return profile;
#else
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | chrome/browser/profiles/profile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698