update_engine: Pospone setgoodkernel after update check
Currently, if an update is forced, we first run setgoodkernel and then continue
with the update check. However, this delays the update check screen in the
OOBE. This patch adds a new Action, UpdateBootFlagsAction which is configured to
run AFTER an update check and response. However, now if the update check failed
due for example the response was invalid, then setgoodkernel will not
happen. But we already have a mechanism in SystemState where setgoodkernel is
always called (currently) 45 seconds after the boot. So there would no worries.
BUG=chromium:807976
TEST=unittests
TEST=powerwashed the device, and the check for update passed faster on OOBE.
Change-Id: I5845d7a4c1393aec568b6279dfbb7d3dfa31cdd8
Reviewed-on: https://chromium-review.googlesource.com/1011244
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Sen Jiang <senj@chromium.org>
diff --git a/update_attempter_unittest.cc b/update_attempter_unittest.cc
index 4af5f8b..0267953 100644
--- a/update_attempter_unittest.cc
+++ b/update_attempter_unittest.cc
@@ -49,6 +49,7 @@
#include "update_engine/payload_consumer/install_plan.h"
#include "update_engine/payload_consumer/payload_constants.h"
#include "update_engine/payload_consumer/postinstall_runner_action.h"
+#include "update_engine/update_boot_flags_action.h"
using base::Time;
using base::TimeDelta;
@@ -442,15 +443,15 @@
namespace {
// Actions that will be built as part of an update check.
const string kUpdateActionTypes[] = { // NOLINT(runtime/string)
- OmahaRequestAction::StaticType(),
- OmahaResponseHandlerAction::StaticType(),
- OmahaRequestAction::StaticType(),
- DownloadAction::StaticType(),
- OmahaRequestAction::StaticType(),
- FilesystemVerifierAction::StaticType(),
- PostinstallRunnerAction::StaticType(),
- OmahaRequestAction::StaticType()
-};
+ OmahaRequestAction::StaticType(),
+ OmahaResponseHandlerAction::StaticType(),
+ UpdateBootFlagsAction::StaticType(),
+ OmahaRequestAction::StaticType(),
+ DownloadAction::StaticType(),
+ OmahaRequestAction::StaticType(),
+ FilesystemVerifierAction::StaticType(),
+ PostinstallRunnerAction::StaticType(),
+ OmahaRequestAction::StaticType()};
// Actions that will be built as part of a user-initiated rollback.
const string kRollbackActionTypes[] = { // NOLINT(runtime/string)