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

Unified Diff: ash/system/date/date_default_view.cc

Issue 811283003: Clean-up of the system shutdown code paths (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: alignment fixes, rebase Created 5 years, 11 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 | « no previous file | ash/system/tray/default_system_tray_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/date/date_default_view.cc
diff --git a/ash/system/date/date_default_view.cc b/ash/system/date/date_default_view.cc
index 6b07e25e06177de0ea8ce46f09cb884a86092d5a..44cb9978d5b595c884bc18c87cb4292b7f1dac60 100644
--- a/ash/system/date/date_default_view.cc
+++ b/ash/system/date/date_default_view.cc
@@ -12,6 +12,7 @@
#include "ash/system/tray/system_tray_delegate.h"
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_popup_header_button.h"
+#include "ash/wm/lock_state_controller.h"
#include "grit/ash_resources.h"
#include "grit/ash_strings.h"
#include "ui/base/l10n/l10n_util.h"
@@ -111,7 +112,8 @@ void DateDefaultView::ButtonPressed(views::Button* sender,
tray_delegate->ShowHelp();
} else if (sender == shutdown_) {
shell->metrics()->RecordUserMetricsAction(ash::UMA_TRAY_SHUT_DOWN);
- tray_delegate->ShutDown();
+ ash::Shell::GetInstance()->lock_state_controller()->RequestShutdown(
+ ash::LockStateController::POWER_OFF);
} else if (sender == lock_) {
shell->metrics()->RecordUserMetricsAction(ash::UMA_TRAY_LOCK_SCREEN);
tray_delegate->RequestLockScreen();
« no previous file with comments | « no previous file | ash/system/tray/default_system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698