update_engine: Don't require reboot after install.
We don't require a reboot after installing a DLC. Instead just set
Update Engine's status to idle.
Resubmitting now that crbug.com/905704 is fixed.
BUG=chromium:907205,chromium:907632
TEST=Attempt a DLC install, UE no longer prompts for a reboot.
(cherry picked from commit d772aaebdbd0c53d3e46e21df5783d437809108a)
Change-Id: I061ee8d6268a922ae21f310211acea5b645a3ebb
Reviewed-on: https://chromium-review.googlesource.com/1362572
Commit-Ready: Colin Howes <chowes@google.com>
Tested-by: Colin Howes <chowes@google.com>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
diff --git a/update_attempter.cc b/update_attempter.cc
index 50c72f0..179b455 100644
--- a/update_attempter.cc
+++ b/update_attempter.cc
@@ -1051,6 +1051,13 @@
system_state_->payload_state()->SetStagingWaitPeriod(TimeDelta());
prefs_->Delete(kPrefsUpdateFirstSeenAt);
+ if (is_install_) {
+ LOG(INFO) << "DLC successfully installed, no reboot needed.";
+ SetStatusAndNotify(UpdateStatus::IDLE);
+ ScheduleUpdates();
+ return;
+ }
+
SetStatusAndNotify(UpdateStatus::UPDATED_NEED_REBOOT);
ScheduleUpdates();
LOG(INFO) << "Update successfully applied, waiting to reboot.";