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/update_attempter.h b/update_attempter.h
index 3e47969..cd7f480 100644
--- a/update_attempter.h
+++ b/update_attempter.h
@@ -86,6 +86,10 @@
void CheckForUpdate(const std::string& app_version,
const std::string& omaha_url);
+ // Initiates a reboot if the current state is
+ // UPDATED_NEED_REBOOT. Returns true on sucess, false otherwise.
+ bool RebootIfNeeded();
+
// DownloadActionDelegate method
void BytesReceived(uint64_t bytes_received, uint64_t total);