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

Unified Diff: chrome/browser/policy/cloud/cloud_policy_invalidator.h

Issue 460573005: Pass highest handled invalidation version between invalidators (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code and tests done. Ready for review. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 6653a5d305eafa5bfdeb5c7b5ed033c33871e19c..7033c138dafb3b854d75202d74950af5ee61c3f5 100644
--- a/chrome/browser/policy/cloud/cloud_policy_invalidator.h
+++ b/chrome/browser/policy/cloud/cloud_policy_invalidator.h
@@ -64,11 +64,14 @@ class CloudPolicyInvalidator : public syncer::InvalidationHandler,
// |task_runner| is used for scheduling delayed tasks. It must post tasks to
// the main policy thread.
// |clock| is used to get the current time.
+ // |highest_handled_invalidation_version| is the highest invalidation version
+ // that was handled already before this invalidator was created.
CloudPolicyInvalidator(
enterprise_management::DeviceRegisterRequest::Type type,
CloudPolicyCore* core,
const scoped_refptr<base::SequencedTaskRunner>& task_runner,
- scoped_ptr<base::Clock> clock);
+ scoped_ptr<base::Clock> clock,
+ int64 highest_handled_invalidation_version);
virtual ~CloudPolicyInvalidator();
// Initializes the invalidator. No invalidations will be generated before this
@@ -86,6 +89,11 @@ class CloudPolicyInvalidator : public syncer::InvalidationHandler,
return invalidations_enabled_;
}
+ // The highest invalidation version that was handled already.
+ int64 highest_handled_invalidation_version() const {
+ return highest_handled_invalidation_version_;
+ }
+
// syncer::InvalidationHandler:
virtual void OnInvalidatorStateChange(
syncer::InvalidatorState state) OVERRIDE;
@@ -207,6 +215,9 @@ class CloudPolicyInvalidator : public syncer::InvalidationHandler,
// invalidation_version_ when such invalidations occur.
int unknown_version_invalidation_count_;
+ // The highest invalidation version that was handled already.
+ int64 highest_handled_invalidation_version_;
+
// The most up to date invalidation.
scoped_ptr<syncer::Invalidation> invalidation_;

Powered by Google App Engine
This is Rietveld 408576698