From 45763c0afb375fa2f6072dc6d85e85296d2df054 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Thu, 14 Dec 2017 08:39:00 -0300 Subject: [PATCH] fixup! Implement powerMonitor 'shutdown' event for Linux --- atom/browser/lib/power_observer_linux.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/atom/browser/lib/power_observer_linux.cc b/atom/browser/lib/power_observer_linux.cc index ac641a2fe0..d34b11f524 100644 --- a/atom/browser/lib/power_observer_linux.cc +++ b/atom/browser/lib/power_observer_linux.cc @@ -122,12 +122,12 @@ void PowerObserverLinux::OnInhibitResponse(base::ScopedFD* scoped_fd, void PowerObserverLinux::OnPrepareForSleep(dbus::Signal* signal) { dbus::MessageReader reader(signal); - bool status; - if (!reader.PopBool(&status)) { + bool suspending; + if (!reader.PopBool(&suspending)) { LOG(ERROR) << "Invalid signal: " << signal->ToString(); return; } - if (status) { + if (suspending) { OnSuspend(); sleep_lock_.reset(); } else { @@ -138,12 +138,12 @@ void PowerObserverLinux::OnPrepareForSleep(dbus::Signal* signal) { void PowerObserverLinux::OnPrepareForShutdown(dbus::Signal* signal) { dbus::MessageReader reader(signal); - bool status; - if (!reader.PopBool(&status)) { + bool shutting_down; + if (!reader.PopBool(&shutting_down)) { LOG(ERROR) << "Invalid signal: " << signal->ToString(); return; } - if (status) { + if (shutting_down) { if (!OnShutdown()) { // The user didn't try to prevent shutdown. Release the lock and allow the // shutdown to continue normally.