update_engine: Place enterprise rollback save marker file
- There are now two types of rollback. One that does a full powerwash
and one that save some system state.
- When an enterprise rollback powerwash is scheduled, place a marker
file to tell the shutdown process to save data before rebooting.
- This lets rollback preserve additional data over a powerwash that
can be restored later.
- Change a few places that were using is_rollback to save_rollback_data
to be explicit.
BUG=chromium:955463
TEST=unittests
Change-Id: I9f18319e711e425a6e712dd319e03bcc6ddd0a1b
Reviewed-on: https://chromium-review.googlesource.com/1414030
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Zentaro Kavanagh <zentaro@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
diff --git a/update_manager/policy.h b/update_manager/policy.h
index 5d65d9a..9e7df10 100644
--- a/update_manager/policy.h
+++ b/update_manager/policy.h
@@ -50,6 +50,8 @@
std::string target_version_prefix;
// Specifies whether rollback images are allowed by device policy.
bool rollback_allowed;
+ // Specifies if rollbacks should attempt to preserve some system state.
+ bool rollback_data_save_requested;
// Specifies the number of Chrome milestones rollback should be allowed,
// starting from the stable version at any time. Value is -1 if unspecified
// (e.g. no device policy is available yet), in this case no version