Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(405)

Issue 2472593003: Fix behavior of cloud policy refreshes scheduled for soon (Closed)

Created:
4 years, 1 month ago by emaxx
Modified:
4 years, 1 month ago
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix behavior of cloud policy refreshes scheduled for soon The CloudPolicyRefreshScheduler class was implemented in such a way that refreshes scheduled for soon using the RefreshSoon method could be actually overridden by subsequent changes resulting in re-scheduling of the refresh. As an example of case which would result in ignoring a soon refresh is the OnStoreLoaded observer called when there's a non-empty response map in the policy client. This observer in this case would update the last_refresh_ field when it's empty, breaking some assumptions in the existing code. This CL introduces a different implementation for the RefreshSoon method which ensures that the scheduled soon refresh cannot be overridden by subsequent refresh updates. BUG=644304 TEST=unit test Committed: https://crrev.com/6660a9d0880ad8cc3847fba07d98ef1f05d3869b Cr-Commit-Position: refs/heads/master@{#429632}

Patch Set 1 #

Patch Set 2 : Extend test #

Total comments: 4

Patch Set 3 : Restructure the logic #

Patch Set 4 : Change comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -16 lines) Patch
M components/policy/core/common/cloud/cloud_policy_refresh_scheduler.h View 1 2 3 4 chunks +10 lines, -6 lines 0 comments Download
M components/policy/core/common/cloud/cloud_policy_refresh_scheduler.cc View 1 2 7 chunks +22 lines, -10 lines 0 comments Download
M components/policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc View 1 1 chunk +30 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (18 generated)
emaxx
Drew, PTAL. Mattias: FYI, but happy to receive any feedback from you too.
4 years, 1 month ago (2016-11-02 20:24:09 UTC) #7
Mattias Nissler (ping if slow)
FWIW, looks good to me.
4 years, 1 month ago (2016-11-03 09:47:34 UTC) #10
Andrew T Wilson (Slow)
This is a bit wonky - it feels like what we're doing is *sometimes* ignoring ...
4 years, 1 month ago (2016-11-03 15:02:56 UTC) #11
emaxx
PTAL. On 2016/11/03 15:02:56, Andrew T Wilson (Slow) wrote: > This is a bit wonky ...
4 years, 1 month ago (2016-11-03 16:13:10 UTC) #16
Andrew T Wilson (Slow)
lgtm
4 years, 1 month ago (2016-11-03 17:23:44 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2472593003/60001
4 years, 1 month ago (2016-11-03 17:29:10 UTC) #22
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 1 month ago (2016-11-03 17:35:02 UTC) #24
commit-bot: I haz the power
4 years, 1 month ago (2016-11-03 17:48:13 UTC) #26
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/6660a9d0880ad8cc3847fba07d98ef1f05d3869b
Cr-Commit-Position: refs/heads/master@{#429632}

Powered by Google App Engine
This is Rietveld 408576698