Implement shutdown event for macOS

This commit is contained in:
Cheng Zhao 2018-02-05 16:13:35 +09:00
parent c470e758cc
commit 983e1b1a70
7 changed files with 25 additions and 6 deletions

View file

@ -148,7 +148,7 @@ void PowerObserverLinux::OnPrepareForShutdown(dbus::Signal* signal) {
return;
}
if (shutting_down) {
if (!should_shutdown_ || !should_shutdown_.Run()) {
if (!should_shutdown_ || should_shutdown_.Run()) {
// The user didn't try to prevent shutdown. Release the lock and allow the
// shutdown to continue normally.
shutdown_lock_.reset();