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..3a8745bf7a57da59a575ba9e81260078fb3601c9 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 seconds, between policy timestamps and |
+ // invalidation timestamps when determining if an invalidation is expired. |
+ static const int kMaxInvalidationTimeDelta; |
+ |
// |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(); |