Commit 5a0a82c9 authored by Adolfo Victoria's avatar Adolfo Victoria Committed by chrome-bot
Browse files

update_engine: add utilities for update staging policy

Add staging_utils files that contain logic to decide what
to changes should be done to the state. This includes:
* Turn off staging if there is a forced update or if OOBE hasn't been
completed
* Keep the current staging state if no changes to the policy are
detected.
* Use a new waiting time if there have been changes to the policy.
* If there is a persisted value that is still valid, use it.

These changes aren't added to the update engine yet. The return value
of CalculateStagingCase will be used in update_attempter in
a switch statement to update the state based on the value.

BUG=chromium:858621
TEST=cros_workon_make update_engine --test
CQ-DEPEND=CL:1142480

Change-Id: Ib06365793618c3f2a357e3ace8c660fe51cdf950
Reviewed-on: https://chromium-review.googlesource.com/1138983


Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: default avatarAdolfo Higueros <adokar@google.com>
Reviewed-by: default avatarAmin Hassani <ahassani@chromium.org>
parent 0cd9d778
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment