| Index: chrome/browser/chromeos/profiles/profile_helper.cc
|
| diff --git a/chrome/browser/chromeos/profiles/profile_helper.cc b/chrome/browser/chromeos/profiles/profile_helper.cc
|
| index 70edd29cd42d6e0730efc7c55b814345a6257886..dfa21c9738f8bd29184b393895147f2c983f14fe 100644
|
| --- a/chrome/browser/chromeos/profiles/profile_helper.cc
|
| +++ b/chrome/browser/chromeos/profiles/profile_helper.cc
|
| @@ -62,7 +62,7 @@ ProfileHelper::~ProfileHelper() {
|
| // Checking whether UserManager is initialized covers case
|
| // when ScopedTestUserManager is used.
|
| if (UserManager::IsInitialized())
|
| - UserManager::Get()->RemoveSessionStateObserver(this);
|
| + GetUserManager()->RemoveSessionStateObserver(this);
|
| }
|
|
|
| // static
|
| @@ -151,7 +151,7 @@ base::FilePath ProfileHelper::GetUserProfileDirByUserId(
|
| // ProfileManager and use only this function to construct profile path.
|
| // TODO(nkostylev): Cleanup profile dir related code paths crbug.com/294233
|
| base::FilePath profile_dir;
|
| - const User* user = UserManager::Get()->FindUser(user_id);
|
| + const User* user = GetUserManager()->FindUser(user_id);
|
| if (user && !user->username_hash().empty())
|
| profile_dir = ProfileHelper::GetUserProfileDir(user->username_hash());
|
|
|
| @@ -174,7 +174,7 @@ bool ProfileHelper::IsOwnerProfile(Profile* profile) {
|
| if (!user)
|
| return false;
|
|
|
| - return user->email() == chromeos::UserManager::Get()->GetOwnerEmail();
|
| + return user->email() == chromeos::GetUserManager()->GetOwnerEmail();
|
| }
|
|
|
| void ProfileHelper::ProfileStartup(Profile* profile, bool process_startup) {
|
| @@ -188,8 +188,8 @@ void ProfileHelper::ProfileStartup(Profile* profile, bool process_startup) {
|
| // Add observer so we can see when the first profile's session restore is
|
| // completed. After that, we won't need the default profile anymore.
|
| if (!IsSigninProfile(profile) &&
|
| - UserManager::Get()->IsLoggedInAsRegularUser() &&
|
| - !UserManager::Get()->IsLoggedInAsStub()) {
|
| + GetUserManager()->IsLoggedInAsRegularUser() &&
|
| + !GetUserManager()->IsLoggedInAsStub()) {
|
| chromeos::OAuth2LoginManager* login_manager =
|
| chromeos::OAuth2LoginManagerFactory::GetInstance()->GetForProfile(
|
| profile);
|
| @@ -203,7 +203,7 @@ base::FilePath ProfileHelper::GetActiveUserProfileDir() {
|
| }
|
|
|
| void ProfileHelper::Initialize() {
|
| - UserManager::Get()->AddSessionStateObserver(this);
|
| + GetUserManager()->AddSessionStateObserver(this);
|
| }
|
|
|
| void ProfileHelper::ClearSigninProfile(const base::Closure& on_clear_callback) {
|
| @@ -240,7 +240,7 @@ Profile* ProfileHelper::GetProfileByUser(const User* user) {
|
|
|
| // GetActiveUserProfile() or GetProfileByUserIdHash() returns a new instance
|
| // of ProfileImpl(), but actually its OffTheRecordProfile() should be used.
|
| - if (profile && UserManager::Get()->IsLoggedInAsGuest())
|
| + if (profile && GetUserManager()->IsLoggedInAsGuest())
|
| profile = profile->GetOffTheRecordProfile();
|
| return profile;
|
| }
|
| @@ -249,7 +249,7 @@ User* ProfileHelper::GetUserByProfile(Profile* profile) {
|
| // This map is non-empty only in tests.
|
| if (enable_profile_to_user_testing || !user_list_for_testing_.empty()) {
|
| if (always_return_primary_user_for_testing)
|
| - return const_cast<User*>(UserManager::Get()->GetPrimaryUser());
|
| + return const_cast<User*>(GetUserManager()->GetPrimaryUser());
|
|
|
| const std::string& user_name = profile->GetProfileName();
|
| for (UserList::const_iterator it = user_list_for_testing_.begin();
|
| @@ -260,14 +260,14 @@ User* ProfileHelper::GetUserByProfile(Profile* profile) {
|
| }
|
|
|
| // In case of test setup we should always default to primary user.
|
| - return const_cast<User*>(UserManager::Get()->GetPrimaryUser());
|
| + return const_cast<User*>(GetUserManager()->GetPrimaryUser());
|
| }
|
|
|
| DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
|
| if (ProfileHelper::IsSigninProfile(profile))
|
| return NULL;
|
|
|
| - UserManager* user_manager = UserManager::Get();
|
| + UserManager* user_manager = GetUserManager();
|
|
|
| // Special case for non-CrOS tests that do create several profiles
|
| // and don't really care about mapping to the real user.
|
|
|