update_engine: Add enterprise rollback update policy impl
This CL adds a new rollback update policy which checks if the
update to be downloaded is a rollback by checking the value of
InstallPlan::is_rollback which is set in omaha_response_handler_action.
The intent is to consult this policy in a later CL in
ChromeOSPolicy::UpdateCanBeApplied as download time restrictions will
not be applied if current update being downloaded is a rollback.
BUG=chromium:1117450
TEST=FEATURES=test emerge-${BOARD} update_engine
Change-Id: Ib3a23a57fb60d4d0e983688f78941cdbd587718e
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2532793
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Jae Hoon Kim <kimjae@chromium.org>
Tested-by: Saurabh Nijhara <snijhara@google.com>
Commit-Queue: Saurabh Nijhara <snijhara@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 5ac0a3f..3674f50 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -225,6 +225,7 @@
"update_manager/default_policy.cc",
"update_manager/enough_slots_ab_updates_policy_impl.cc",
"update_manager/enterprise_device_policy_impl.cc",
+ "update_manager/enterprise_rollback_policy_impl.cc",
"update_manager/evaluation_context.cc",
"update_manager/interactive_update_policy_impl.cc",
"update_manager/minimum_version_policy_impl.cc",
@@ -531,6 +532,7 @@
"update_manager/boxed_value_unittest.cc",
"update_manager/chromeos_policy_unittest.cc",
"update_manager/enterprise_device_policy_impl_unittest.cc",
+ "update_manager/enterprise_rollback_policy_impl_unittest.cc",
"update_manager/evaluation_context_unittest.cc",
"update_manager/generic_variables_unittest.cc",
"update_manager/minimum_version_policy_impl_unittest.cc",