Chromium Code Reviews| Index: chrome/browser/policy/cloud/cloud_policy_invalidator.h |
| diff --git a/chrome/browser/policy/cloud/cloud_policy_invalidator.h b/chrome/browser/policy/cloud/cloud_policy_invalidator.h |
| index c9d99d198d914481f60921ca020ab8d74283ae7f..35e678189f11986109506445e40315aa59e41d3f 100644 |
| --- a/chrome/browser/policy/cloud/cloud_policy_invalidator.h |
| +++ b/chrome/browser/policy/cloud/cloud_policy_invalidator.h |
| @@ -48,6 +48,14 @@ class CloudPolicyInvalidator : public syncer::InvalidationHandler, |
| // once the invalidation service starts up. |
| static const int kInvalidationGracePeriod; |
| + // Time, in seconds, for which unknown version invalidations are ignored after |
| + // fetching a policy. |
| + static const int kUnknownVersionIgnorePeriod; |
| + |
| + // The max tolerated discrepancy, in minutes, between policy timestamps and |
| + // invalidation timestamps when determining if an invalidation is expired. |
| + static const int kMaxInvalidationTimeDelta; |
|
Joao da Silva
2014/04/08 12:31:59
I'd suggest having both times in seconds, up to yo
Steve Condie
2014/04/08 18:09:39
Done.
|
| + |
| // |core| is the cloud policy core which connects the various policy objects. |
| // It must remain valid until Shutdown is called. |
| // |task_runner| is used for scheduling delayed tasks. It must post tasks to |
| @@ -124,10 +132,18 @@ class CloudPolicyInvalidator : public syncer::InvalidationHandler, |
| // previous call. |
| bool IsPolicyChanged(const enterprise_management::PolicyData* policy); |
| + // Determine if an invalidation has expired. |
| + // |version| is the version of the invalidation, or zero for unknown. |
| + bool IsInvalidationExpired(int64 version); |
| + |
| // Get the kMetricPolicyRefresh histogram metric which should be incremented |
| // when a policy is stored. |
| int GetPolicyRefreshMetric(bool policy_changed); |
| + // Get the kMetricPolicyInvalidations histogram metric which should be |
| + // incremented when an invalidation is received. |
| + int GetInvalidationMetric(bool is_missing_payload, bool is_expired); |
| + |
| // Determine if invalidations have been enabled longer than the grace period. |
| bool GetInvalidationsEnabled(); |