AU: Provide a reboot_if_needed D-Bus API.
This will reboot if the current state is UPDATED_REBOOT_NEEDED.
Also add -reboot option to the update_engine_client.
BUG=4250
TEST=unit tests,gmerged on device and tried reboot requests
Review URL: http://codereview.chromium.org/3034026
diff --git a/UpdateEngine.conf b/UpdateEngine.conf
index 05f0056..94aa5a5 100644
--- a/UpdateEngine.conf
+++ b/UpdateEngine.conf
@@ -22,6 +22,9 @@
<allow send_destination="org.chromium.UpdateEngine"
send_interface="org.chromium.UpdateEngineInterface"
send_member="GetStatus"/>
+ <allow send_destination="org.chromium.UpdateEngine"
+ send_interface="org.chromium.UpdateEngineInterface"
+ send_member="RebootIfNeeded"/>
</policy>
<policy context="default">
<deny send_destination="org.chromium.UpdateEngine" />