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

Unified Diff: ash/wm/session_state_controller_impl2.cc

Issue 12481018: ash: Add metrics for screen lock and shutdown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: report metric before requesting lock Created 7 years, 9 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
« no previous file with comments | « ash/system/date/tray_date.cc ('k') | chrome/browser/ui/ash/chrome_shell_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/session_state_controller_impl2.cc
diff --git a/ash/wm/session_state_controller_impl2.cc b/ash/wm/session_state_controller_impl2.cc
index 2084e00c5096c08c344581fdd07e3f5b434e413d..bb5c68eaa789d0fd7cc7b128e6ac7d3b5ff1694a 100644
--- a/ash/wm/session_state_controller_impl2.cc
+++ b/ash/wm/session_state_controller_impl2.cc
@@ -370,6 +370,8 @@ void SessionStateControllerImpl2::OnRealShutdownTimeout() {
}
}
#endif
+ Shell::GetInstance()->delegate()->RecordUserMetricsAction(
+ UMA_ACCEL_SHUT_DOWN_POWER_BUTTON);
delegate_->RequestShutdown();
}
@@ -386,8 +388,13 @@ void SessionStateControllerImpl2::LockAnimationCancelled() {
void SessionStateControllerImpl2::PreLockAnimationFinished(bool request_lock) {
can_cancel_lock_animation_ = false;
- if (request_lock)
+ if (request_lock) {
+ Shell::GetInstance()->delegate()->RecordUserMetricsAction(
+ shutdown_after_lock_ ?
+ UMA_ACCEL_LOCK_SCREEN_POWER_BUTTON :
+ UMA_ACCEL_LOCK_SCREEN_LOCK_BUTTON);
delegate_->RequestLockScreen();
+ }
lock_fail_timer_.Start(
FROM_HERE,
« no previous file with comments | « ash/system/date/tray_date.cc ('k') | chrome/browser/ui/ash/chrome_shell_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698