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

Issue 226093005: Reduce unneeded policy fetches by detecting expired invalidations. (Closed)

Created:
6 years, 8 months ago by Steve Condie
Modified:
6 years, 8 months ago
CC:
chromium-reviews, jar (doing other things), asvitkine+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Reduce unneeded policy fetches by detecting expired invalidations. User policy fetches currently occur whenever a user with policy signs into Chrome. If the policy was changed while the user was offline, the new policy is received at that time. However, the invalidation service will still send a notification that the policy was updated, possibly causing Chrome to fetch the policy again needlessly (depending on the initial policy fetch time vs the invalidation delivery time). For versioned invalidations, we can solve this problem by comparing the version, which is a timestamp, to the timestamp of the current policy. If the invalidation was created sufficiently long before the policy was fetched, we can ignore it assuming that we already have the update. For unknown version invalidations, we did some investigation on the server side indicating that most of these are due to users that have never had a policy change, so the invalidation server determines that the policy version is unknown. We will ignore unknown version invalidations if the policy has been fetched within the past 30 seconds. BUG=355884 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=262782

Patch Set 1 #

Total comments: 2

Patch Set 2 : Incorporate feedback from Ilya #

Patch Set 3 : Fix CloudPolicyTest.InvalidatePolicy #

Total comments: 4

Patch Set 4 : Incorporate feedback from Joao #

Patch Set 5 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+214 lines, -70 lines) Patch
M chrome/browser/policy/cloud/cloud_policy_browsertest.cc View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/policy/cloud/cloud_policy_invalidator.h View 1 2 3 2 chunks +16 lines, -0 lines 0 comments Download
M chrome/browser/policy/cloud/cloud_policy_invalidator.cc View 1 2 3 6 chunks +58 lines, -14 lines 0 comments Download
M chrome/browser/policy/cloud/cloud_policy_invalidator_unittest.cc View 1 2 3 16 chunks +118 lines, -53 lines 0 comments Download
M components/policy/core/common/cloud/enterprise_metrics.h View 1 chunk +14 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Steve Condie
CL 3 of 3 for crbug.com/355884 Added Ilya for histogram update
6 years, 8 months ago (2014-04-04 20:57:27 UTC) #1
Ilya Sherman
LGTM with a question/suggestion: https://codereview.chromium.org/226093005/diff/1/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (left): https://codereview.chromium.org/226093005/diff/1/tools/metrics/histograms/histograms.xml#oldcode31714 tools/metrics/histograms/histograms.xml:31714: <int value="1" label="Payload"/> Do the ...
6 years, 8 months ago (2014-04-04 21:48:56 UTC) #2
Steve Condie
https://codereview.chromium.org/226093005/diff/1/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (left): https://codereview.chromium.org/226093005/diff/1/tools/metrics/histograms/histograms.xml#oldcode31714 tools/metrics/histograms/histograms.xml:31714: <int value="1" label="Payload"/> On 2014/04/04 21:48:56, Ilya Sherman wrote: ...
6 years, 8 months ago (2014-04-04 22:11:57 UTC) #3
Joao da Silva
lgtm @Ilya: this metric used to be sampled as UMA_HISTOGRAM_BOOLEAN and now is a UMA_HISTOGRAM_ENUMERATION. ...
6 years, 8 months ago (2014-04-08 12:31:59 UTC) #4
Steve Condie
https://codereview.chromium.org/226093005/diff/40001/chrome/browser/policy/cloud/cloud_policy_invalidator.h File chrome/browser/policy/cloud/cloud_policy_invalidator.h (right): https://codereview.chromium.org/226093005/diff/40001/chrome/browser/policy/cloud/cloud_policy_invalidator.h#newcode57 chrome/browser/policy/cloud/cloud_policy_invalidator.h:57: static const int kMaxInvalidationTimeDelta; On 2014/04/08 12:31:59, Joao da ...
6 years, 8 months ago (2014-04-08 18:09:38 UTC) #5
Steve Condie
The CQ bit was checked by stepco@chromium.org
6 years, 8 months ago (2014-04-08 18:14:56 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/stepco@chromium.org/226093005/50001
6 years, 8 months ago (2014-04-08 18:15:47 UTC) #7
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-08 18:49:48 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
6 years, 8 months ago (2014-04-08 18:49:48 UTC) #9
Ilya Sherman
On 2014/04/08 12:31:59, Joao da Silva wrote: > lgtm > > @Ilya: this metric used ...
6 years, 8 months ago (2014-04-08 19:36:10 UTC) #10
Steve Condie
The CQ bit was checked by stepco@chromium.org
6 years, 8 months ago (2014-04-08 20:16:56 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/stepco@chromium.org/226093005/70001
6 years, 8 months ago (2014-04-08 20:17:11 UTC) #12
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-08 20:48:07 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
6 years, 8 months ago (2014-04-08 20:48:07 UTC) #14
Steve Condie
The CQ bit was checked by stepco@chromium.org
6 years, 8 months ago (2014-04-09 18:39:06 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/stepco@chromium.org/226093005/70001
6 years, 8 months ago (2014-04-09 18:39:53 UTC) #16
commit-bot: I haz the power
6 years, 8 months ago (2014-04-09 20:00:43 UTC) #17
Message was sent while issue was closed.
Change committed as 262782

Powered by Google App Engine
This is Rietveld 408576698