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

Unified Diff: chrome/browser/idle_chromeos.cc

Issue 693643004: Make UserActivityDetector a singleton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@athena_do_not_use_ash45
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « chrome/browser/chromeos/system/automatic_reboot_manager.cc ('k') | ui/wm/core/user_activity_detector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/idle_chromeos.cc
diff --git a/chrome/browser/idle_chromeos.cc b/chrome/browser/idle_chromeos.cc
index f61ff5e8d57dc9bb9af11621779772edc37bbadb..96b058c398cd60e9c56fd11872a56a181decb38a 100644
--- a/chrome/browser/idle_chromeos.cc
+++ b/chrome/browser/idle_chromeos.cc
@@ -10,14 +10,8 @@
#include "ui/wm/core/user_activity_detector.h"
void CalculateIdleTime(IdleTimeCallback notify) {
-#if defined(USE_ATHENA)
- // TODO(oshima): Implement this for athena. crbug.com/408752
- base::TimeDelta idle_time;
- NOTIMPLEMENTED();
-#else
base::TimeDelta idle_time = base::TimeTicks::Now() -
- ash::Shell::GetInstance()->user_activity_detector()->last_activity_time();
-#endif
+ wm::UserActivityDetector::Get()->last_activity_time();
notify.Run(static_cast<int>(idle_time.InSeconds()));
}
« no previous file with comments | « chrome/browser/chromeos/system/automatic_reboot_manager.cc ('k') | ui/wm/core/user_activity_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698