X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fchrome%2Fbrowser%2Fchromeos%2Fsystem%2Fautomatic_reboot_manager.cc;h=81d6dcdfc3ff888994f99c15c930ea47013388f9;hb=1afa4dd80ef85af7c90efaea6959db1d92330844;hp=1d91ec13f6306c791c5b3a83baf20e7e85bbc5d0;hpb=90762837333c13ccf56f2ad88e4481fc71e8d281;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/chrome/browser/chromeos/system/automatic_reboot_manager.cc b/src/chrome/browser/chromeos/system/automatic_reboot_manager.cc index 1d91ec1..81d6dcd 100644 --- a/src/chrome/browser/chromeos/system/automatic_reboot_manager.cc +++ b/src/chrome/browser/chromeos/system/automatic_reboot_manager.cc @@ -11,7 +11,6 @@ #include #include -#include "ash/shell.h" #include "base/bind.h" #include "base/bind_helpers.h" #include "base/callback.h" @@ -172,8 +171,8 @@ AutomaticRebootManager::AutomaticRebootManager( // idle. Start listening for user activity to determine whether the user is // idle or not. if (!user_manager::UserManager::Get()->IsUserLoggedIn()) { - if (ash::Shell::HasInstance()) - ash::Shell::GetInstance()->user_activity_detector()->AddObserver(this); + if (wm::UserActivityDetector::Get()) + wm::UserActivityDetector::Get()->AddObserver(this); notification_registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_CHANGED, content::NotificationService::AllSources()); login_screen_idle_timer_.reset( @@ -202,8 +201,8 @@ AutomaticRebootManager::~AutomaticRebootManager() { DBusThreadManager* dbus_thread_manager = DBusThreadManager::Get(); dbus_thread_manager->GetPowerManagerClient()->RemoveObserver(this); dbus_thread_manager->GetUpdateEngineClient()->RemoveObserver(this); - if (ash::Shell::HasInstance()) - ash::Shell::GetInstance()->user_activity_detector()->RemoveObserver(this); + if (wm::UserActivityDetector::Get()) + wm::UserActivityDetector::Get()->RemoveObserver(this); } void AutomaticRebootManager::AddObserver( @@ -270,8 +269,8 @@ void AutomaticRebootManager::Observe( } else if (type == chrome::NOTIFICATION_LOGIN_USER_CHANGED) { // A session is starting. Stop listening for user activity as it no longer // is a relevant criterion. - if (ash::Shell::HasInstance()) - ash::Shell::GetInstance()->user_activity_detector()->RemoveObserver(this); + if (wm::UserActivityDetector::Get()) + wm::UserActivityDetector::Get()->RemoveObserver(this); notification_registrar_.Remove( this, chrome::NOTIFICATION_LOGIN_USER_CHANGED, content::NotificationService::AllSources());