summaryrefslogtreecommitdiff
path: root/update_manager/update_time_restrictions_policy_impl.h
diff options
context:
space:
mode:
authorAdolfo Victoria <adokar@google.com>2018-07-27 13:35:24 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-07-30 23:08:20 -0700
commit7a7a08251e2e177d17b899a99e7a3ae2592be7e6 (patch)
tree9347a29365c50628641a2a08aeb16d98781ff308 /update_manager/update_time_restrictions_policy_impl.h
parentabe4a775df7e9b7b8f09094988f6f1b42acc05a3 (diff)
update_engine: Change time restrictions to return kSucceeded
Change UpdateTimeRestrictionsPolicyImpl to return kSucceeded in place of kAskMeAgainLater. Since the former is not an expected return value. Background: Policies in UpdateCanBeApplied should return kSucceeded when they want to force a decision, since UpdateCanBeApplied is supposed to only contain sync policies. kAskMeAgainLater is reserved for async policies. BUG=chromium:852860 TEST=cros_workon_make update_engine --test and local tests Change-Id: Ie81a3d09f98ad7aba3c36183873bc153a6b530cf Reviewed-on: https://chromium-review.googlesource.com/1153624 Commit-Ready: Adolfo Higueros <adokar@google.com> Tested-by: Adolfo Higueros <adokar@google.com> Reviewed-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: May Lippert <maybelle@chromium.org>
Diffstat (limited to 'update_manager/update_time_restrictions_policy_impl.h')
-rw-r--r--update_manager/update_time_restrictions_policy_impl.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/update_manager/update_time_restrictions_policy_impl.h b/update_manager/update_time_restrictions_policy_impl.h
index 6a810ba7..11cbceb6 100644
--- a/update_manager/update_time_restrictions_policy_impl.h
+++ b/update_manager/update_time_restrictions_policy_impl.h
@@ -37,9 +37,9 @@ class UpdateTimeRestrictionsPolicyImpl : public PolicyImplBase {
~UpdateTimeRestrictionsPolicyImpl() override = default;
// When the current time is inside one of the intervals returns
- // kAskMeAgainLater. If the current time is not inside any intervals returns
- // kContinue. In case of errors, i.e. cannot access intervals or time, return
- // kContinue.
+ // kSucceeded and sets |result| to kOmahaUpdateDeferredPerPolicy. If the
+ // current time is not inside any intervals returns kContinue. In case of
+ // errors, i.e. cannot access intervals or time, return kContinue.
EvalStatus UpdateCanBeApplied(
EvaluationContext* ec,
State* state,