| Index: ash/wm/lock_state_controller.cc
|
| diff --git a/ash/wm/lock_state_controller.cc b/ash/wm/lock_state_controller.cc
|
| index 6a0d8c842b456b4036dc411d4f0410fa84845ed0..3a76e0ebb493f502566e0c8051aa6af29cbb601c 100644
|
| --- a/ash/wm/lock_state_controller.cc
|
| +++ b/ash/wm/lock_state_controller.cc
|
| @@ -167,7 +167,7 @@ void LockStateController::OnStartingLock() {
|
| StartImmediatePreLockAnimation(false /* request_lock_on_completion */);
|
| }
|
|
|
| -void LockStateController::RequestShutdown(ShutdownMode mode) {
|
| +void LockStateController::RequestShutdownOrRestart() {
|
| if (shutting_down_)
|
| return;
|
|
|
| @@ -181,7 +181,7 @@ void LockStateController::RequestShutdown(ShutdownMode mode) {
|
| SessionStateAnimator::ROOT_CONTAINER,
|
| SessionStateAnimator::ANIMATION_GRAYSCALE_BRIGHTNESS,
|
| SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN);
|
| - StartRealShutdownTimer(true, mode);
|
| + StartRealShutdownTimer(true);
|
| }
|
|
|
| void LockStateController::OnLockScreenHide(
|
| @@ -272,11 +272,10 @@ void LockStateController::OnPreShutdownAnimationTimeout() {
|
| Shell* shell = ash::Shell::GetInstance();
|
| shell->cursor_manager()->HideCursor();
|
|
|
| - StartRealShutdownTimer(false, POWER_OFF);
|
| + StartRealShutdownTimer(false);
|
| }
|
|
|
| -void LockStateController::StartRealShutdownTimer(bool with_animation_time,
|
| - ShutdownMode shutdown_mode) {
|
| +void LockStateController::StartRealShutdownTimer(bool with_animation_time) {
|
| base::TimeDelta duration =
|
| base::TimeDelta::FromMilliseconds(kShutdownRequestDelayMs);
|
| if (with_animation_time) {
|
| @@ -296,10 +295,10 @@ void LockStateController::StartRealShutdownTimer(bool with_animation_time,
|
|
|
| real_shutdown_timer_.Start(
|
| FROM_HERE, duration, base::Bind(&LockStateController::OnRealPowerTimeout,
|
| - base::Unretained(this), shutdown_mode));
|
| + base::Unretained(this)));
|
| }
|
|
|
| -void LockStateController::OnRealPowerTimeout(ShutdownMode shutdown_mode) {
|
| +void LockStateController::OnRealPowerTimeout() {
|
| VLOG(1) << "OnRealPowerTimeout";
|
| DCHECK(shutting_down_);
|
| #if defined(OS_CHROMEOS)
|
| @@ -311,15 +310,9 @@ void LockStateController::OnRealPowerTimeout(ShutdownMode shutdown_mode) {
|
| }
|
| }
|
| #endif
|
| - if (shutdown_mode == POWER_OFF) {
|
| - Shell::GetInstance()->metrics()->RecordUserMetricsAction(
|
| - UMA_ACCEL_SHUT_DOWN_POWER_BUTTON);
|
| - delegate_->RequestShutdown();
|
| - return;
|
| - }
|
| Shell::GetInstance()->metrics()->RecordUserMetricsAction(
|
| - UMA_ACCEL_RESTART_POWER_BUTTON);
|
| - delegate_->RequestRestart();
|
| + UMA_ACCEL_SHUT_DOWN_POWER_BUTTON);
|
| + delegate_->RequestShutdownOrRestart();
|
| }
|
|
|
| void LockStateController::StartCancellableShutdownAnimation() {
|
|
|