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

Unified Diff: chrome/browser/chromeos/system/automatic_reboot_manager.cc

Issue 375413002: Replace chromeos::UserManager::Get() with chromeos::GetUserManager(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/system/automatic_reboot_manager.cc
diff --git a/chrome/browser/chromeos/system/automatic_reboot_manager.cc b/chrome/browser/chromeos/system/automatic_reboot_manager.cc
index b5370b7d9c872ff7f935b1ed87c7201220ab970e..131b14b308bb2b1135fb2e3fe68e2caf9da76e80 100644
--- a/chrome/browser/chromeos/system/automatic_reboot_manager.cc
+++ b/chrome/browser/chromeos/system/automatic_reboot_manager.cc
@@ -171,7 +171,7 @@ AutomaticRebootManager::AutomaticRebootManager(
// If no user is logged in, a reboot may be performed whenever the user is
// idle. Start listening for user activity to determine whether the user is
// idle or not.
- if (!UserManager::Get()->IsUserLoggedIn()) {
+ if (!GetUserManager()->IsUserLoggedIn()) {
if (ash::Shell::HasInstance())
ash::Shell::GetInstance()->user_activity_detector()->AddObserver(this);
notification_registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_CHANGED,
@@ -262,7 +262,7 @@ void AutomaticRebootManager::Observe(
const content::NotificationSource& source,
const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_APP_TERMINATING) {
- if (UserManager::Get()->IsUserLoggedIn()) {
+ if (GetUserManager()->IsUserLoggedIn()) {
// The browser is terminating during a session, either because the session
// is ending or because the browser is being restarted.
MaybeReboot(true);
@@ -395,7 +395,7 @@ void AutomaticRebootManager::MaybeReboot(bool ignore_session) {
// * A session is in progress and |ignore_session| is not set.
if (!reboot_requested_ ||
(login_screen_idle_timer_ && login_screen_idle_timer_->IsRunning()) ||
- (!ignore_session && UserManager::Get()->IsUserLoggedIn())) {
+ (!ignore_session && GetUserManager()->IsUserLoggedIn())) {
return;
}
@@ -404,8 +404,8 @@ void AutomaticRebootManager::MaybeReboot(bool ignore_session) {
void AutomaticRebootManager::Reboot() {
// If a non-kiosk-app session is in progress, do not reboot.
- if (UserManager::Get()->IsUserLoggedIn() &&
- !UserManager::Get()->IsLoggedInAsKioskApp()) {
+ if (GetUserManager()->IsUserLoggedIn() &&
+ !GetUserManager()->IsLoggedInAsKioskApp()) {
return;
}

Powered by Google App Engine
This is Rietveld 408576698