Skip to content
  • Lann Martin's avatar
    Fix UMA_ACCEL_SHUT_DOWN_POWER_BUTTON reporting · 4fd794c3
    Lann Martin authored
    This metric was being sent in LockStateController::OnRealPowerTimeout,
    which is also used by e.g. the tray shut down button.
    
    Add ShutdownReason enum with user actions that can trigger shutdown.
    
    Pass ShutdownReason from user event handlers through to
    ShutdownController where it is used to send metrics. Currently only
    ShutdownReason::POWER_BUTTON is handled here as other metrics are
    reported in other locations.
    
    Remove `shutdown_after_lock` param from
    LockStateController::StatLockAnimation in favor of new
    StartLockThenShutdownAnimation method.
    
    BUG=chromium:694039
    TEST=manually verified correct shutdown reasons
    
    Change-Id: I62bddff668a9134d472308d9f5e06283d4b94d1a
    Reviewed-on: https://chromium-review.googlesource.com/543905
    
    
    Commit-Queue: Lann Martin <lannm@chromium.org>
    Reviewed-by: default avatarJacob Dufault <jdufault@chromium.org>
    Reviewed-by: default avatarDan Erat <derat@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#483750}
    4fd794c3