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

Unified Diff: chrome/browser/chromeos/login/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/login_utils.cc
diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc
index f8612bde921f2cb3e849a3e07d50bf7e4d306ad3..962bd6f19ee57ffbeec747ffaedea1213469b478 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -104,11 +104,11 @@ CommandLine CreatePerSessionCommandLine(Profile* profile) {
// Returns true if restart is needed to apply per-session flags.
bool NeedRestartToApplyPerSessionFlags(const CommandLine& user_flags) {
// Don't restart browser if it is not first profile in session.
- if (UserManager::Get()->GetLoggedInUsers().size() != 1)
+ if (GetUserManager()->GetLoggedInUsers().size() != 1)
return false;
// Only restart if needed and if not going into managed mode.
- if (UserManager::Get()->IsLoggedInAsLocallyManagedUser())
+ if (GetUserManager()->IsLoggedInAsLocallyManagedUser())
return false;
if (about_flags::AreSwitchesIdenticalToCurrentCommandLine(
@@ -263,8 +263,8 @@ void LoginUtilsImpl::DoBrowserLaunchOnLocaleLoaded(
void LoginUtilsImpl::DoBrowserLaunchOnLocaleLoadedImpl(
Profile* profile,
LoginDisplayHost* login_host) {
- if (!UserManager::Get()->GetCurrentUserFlow()->ShouldLaunchBrowser()) {
- UserManager::Get()->GetCurrentUserFlow()->LaunchExtraSteps(profile);
+ if (!GetUserManager()->GetCurrentUserFlow()->ShouldLaunchBrowser()) {
+ GetUserManager()->GetCurrentUserFlow()->LaunchExtraSteps(profile);
return;
}
@@ -300,9 +300,9 @@ void LoginUtilsImpl::DoBrowserLaunchOnLocaleLoadedImpl(
// browser before it is dereferenced by the login host.
if (login_host)
login_host->Finalize();
- UserManager::Get()->SessionStarted();
+ GetUserManager()->SessionStarted();
chromeos::BootTimesLoader::Get()->LoginDone(
- chromeos::UserManager::Get()->IsCurrentUserNew());
+ chromeos::GetUserManager()->IsCurrentUserNew());
}
void LoginUtilsImpl::DoBrowserLaunch(Profile* profile,
@@ -366,7 +366,7 @@ bool LoginUtilsImpl::RestartToApplyPerSessionFlagsIfNeed(Profile* profile,
flags.assign(user_flags.argv().begin() + 1, user_flags.argv().end());
VLOG(1) << "Restarting to apply per-session flags...";
DBusThreadManager::Get()->GetSessionManagerClient()->SetFlagsForUser(
- UserManager::Get()->GetActiveUser()->email(), flags);
+ GetUserManager()->GetActiveUser()->email(), flags);
AttemptRestart(profile);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698