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:Adolfo Higueros <adokar@google.com> Reviewed-by:
Amin Hassani <ahassani@chromium.org>
Loading
Please sign in to comment