update_engine: Use powerd for rebooting.
Make update_engine call powerd's RequestRestart method to
restart the system instead of running "shutdown -r now"
directly. This avoids races where Chrome asks powerd to shut
down the system but then update_engine sees that an update
has been applied and reboots it instead.
BUG=chromium:372074
TEST=applied an update and requested a reboot from the UI;
checked that the request was logged by powerd. held the
power button to shut down while an update was pending
and checked that the system shut down instead of
rebooting. built update_engine with the
power_management USE flag unset and checked that it was
still able to reboot the system.
CQ-DEPEND=I73f67cca9875b00bd944e4ff9779ad24fc4cd738
CQ-DEPEND=I2888fdde50a71460b74f2ef33d63ac00c5938626
Change-Id: Ic5f7c33c3f7fc5fe92ac8a2e1800830678cac235
Reviewed-on: https://chromium-review.googlesource.com/206074
Tested-by: Daniel Erat <derat@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: Daniel Erat <derat@chromium.org>
diff --git a/dbus_wrapper_interface.h b/dbus_wrapper_interface.h
index 360657d..7bed2e6 100644
--- a/dbus_wrapper_interface.h
+++ b/dbus_wrapper_interface.h
@@ -46,6 +46,11 @@
GError** error,
GHashTable** out1) = 0;
+ virtual gboolean ProxyCall_1_0(DBusGProxy* proxy,
+ const char* method,
+ GError** error,
+ gint in1) = 0;
+
virtual gboolean ProxyCall_3_0(DBusGProxy* proxy,
const char* method,
GError** error,