summaryrefslogtreecommitdiffstats
path: root/sync/notifier/invalidation_state_tracker.h
diff options
context:
space:
mode:
authormunjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-17 18:01:13 +0000
committermunjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-17 18:01:13 +0000
commit53f218e15338e377c8ee19cd3e49c752ae9dce06 (patch)
tree5c77d77585bb8ccbcb8ac38cc1cf0c917f0088e2 /sync/notifier/invalidation_state_tracker.h
parentbcce9cc2868648619c9b23aa32b044aeceab8f4f (diff)
downloadchromium_src-53f218e15338e377c8ee19cd3e49c752ae9dce06.zip
chromium_src-53f218e15338e377c8ee19cd3e49c752ae9dce06.tar.gz
chromium_src-53f218e15338e377c8ee19cd3e49c752ae9dce06.tar.bz2
Rename InvalidationVersionTracker to InvalidationStateTracker in preparation
to add more methods to that class. BUG=124140 Review URL: https://chromiumcodereview.appspot.com/10407014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137685 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/notifier/invalidation_state_tracker.h')
-rw-r--r--sync/notifier/invalidation_state_tracker.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/sync/notifier/invalidation_state_tracker.h b/sync/notifier/invalidation_state_tracker.h
new file mode 100644
index 0000000..dc8ef26
--- /dev/null
+++ b/sync/notifier/invalidation_state_tracker.h
@@ -0,0 +1,37 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// An InvalidationVersionTracker is an interface that handles getting
+// and setting (persisting) max invalidation versions.
+
+#ifndef SYNC_NOTIFIER_INVALIDATION_STATE_TRACKER_H_
+#define SYNC_NOTIFIER_INVALIDATION_STATE_TRACKER_H_
+
+#include <map>
+
+#include "base/basictypes.h"
+#include "sync/syncable/model_type.h"
+
+namespace sync_notifier {
+
+typedef std::map<syncable::ModelType, int64> InvalidationVersionMap;
+
+class InvalidationStateTracker {
+ public:
+ InvalidationStateTracker() {}
+
+ virtual InvalidationVersionMap GetAllMaxVersions() const = 0;
+
+ // |max_version| should be strictly greater than any existing max
+ // version for |model_type|.
+ virtual void SetMaxVersion(syncable::ModelType model_type,
+ int64 max_version) = 0;
+
+ protected:
+ virtual ~InvalidationStateTracker() {}
+};
+
+} // namespace sync_notifier
+
+#endif // SYNC_NOTIFIER_INVALIDATION_STATE_TRACKER_H_