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

Unified Diff: chrome/browser/chromeos/login/fake_login_utils.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
Index: chrome/browser/chromeos/login/fake_login_utils.cc
diff --git a/chrome/browser/chromeos/login/fake_login_utils.cc b/chrome/browser/chromeos/login/fake_login_utils.cc
index 8719af07c08578e2f4d19db4b00c0092f4c97948..9630adc11a7bf2f39c5edeec958b10aeac98efb6 100644
--- a/chrome/browser/chromeos/login/fake_login_utils.cc
+++ b/chrome/browser/chromeos/login/fake_login_utils.cc
@@ -31,9 +31,8 @@ FakeLoginUtils::~FakeLoginUtils() {}
void FakeLoginUtils::DoBrowserLaunch(Profile* profile,
LoginDisplayHost* login_host) {
-
- if (!UserManager::Get()->GetCurrentUserFlow()->ShouldLaunchBrowser()) {
- UserManager::Get()->GetCurrentUserFlow()->LaunchExtraSteps(profile);
+ if (!GetUserManager()->GetCurrentUserFlow()->ShouldLaunchBrowser()) {
+ GetUserManager()->GetCurrentUserFlow()->LaunchExtraSteps(profile);
return;
}
login_host->BeforeSessionStart();
@@ -52,16 +51,16 @@ void FakeLoginUtils::DoBrowserLaunch(Profile* profile,
}
if (login_host)
login_host->Finalize();
- UserManager::Get()->SessionStarted();
+ GetUserManager()->SessionStarted();
}
void FakeLoginUtils::PrepareProfile(const UserContext& user_context,
bool has_cookies,
bool has_active_session,
LoginUtils::Delegate* delegate) {
- UserManager::Get()->UserLoggedIn(
+ GetUserManager()->UserLoggedIn(
user_context.GetUserID(), user_context.GetUserIDHash(), false);
- User* user = UserManager::Get()->FindUserAndModify(user_context.GetUserID());
+ User* user = GetUserManager()->FindUserAndModify(user_context.GetUserID());
DCHECK(user);
// Make sure that we get the real Profile instead of the login Profile.
@@ -70,11 +69,11 @@ void FakeLoginUtils::PrepareProfile(const UserContext& user_context,
profile->GetPrefs()->SetString(prefs::kGoogleServicesUsername,
user_context.GetUserID());
- if (UserManager::Get()->IsLoggedInAsLocallyManagedUser()) {
- User* active_user = UserManager::Get()->GetActiveUser();
+ if (GetUserManager()->IsLoggedInAsLocallyManagedUser()) {
+ User* active_user = GetUserManager()->GetActiveUser();
std::string supervised_user_sync_id =
- UserManager::Get()->GetSupervisedUserManager()->
- GetUserSyncId(active_user->email());
+ GetUserManager()->GetSupervisedUserManager()->GetUserSyncId(
+ active_user->email());
if (supervised_user_sync_id.empty())
supervised_user_sync_id = "DUMMY ID";
profile->GetPrefs()->SetString(prefs::kSupervisedUserId,

Powered by Google App Engine
This is Rietveld 408576698