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

Side by Side Diff: sync/notifier/invalidation_state_tracker.h

Issue 10698014: [Sync] Rename csync namespace to syncer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/notifier/invalidation_notifier_unittest.cc ('k') | sync/notifier/invalidation_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // An InvalidationVersionTracker is an interface that handles getting 5 // An InvalidationVersionTracker is an interface that handles getting
6 // and setting (persisting) max invalidation versions. 6 // and setting (persisting) max invalidation versions.
7 7
8 #ifndef SYNC_NOTIFIER_INVALIDATION_STATE_TRACKER_H_ 8 #ifndef SYNC_NOTIFIER_INVALIDATION_STATE_TRACKER_H_
9 #define SYNC_NOTIFIER_INVALIDATION_STATE_TRACKER_H_ 9 #define SYNC_NOTIFIER_INVALIDATION_STATE_TRACKER_H_
10 10
11 #include <map> 11 #include <map>
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "google/cacheinvalidation/include/types.h" 14 #include "google/cacheinvalidation/include/types.h"
15 #include "sync/notifier/invalidation_util.h" 15 #include "sync/notifier/invalidation_util.h"
16 16
17 namespace csync { 17 namespace syncer {
18 18
19 typedef std::map<invalidation::ObjectId, int64, ObjectIdLessThan> 19 typedef std::map<invalidation::ObjectId, int64, ObjectIdLessThan>
20 InvalidationVersionMap; 20 InvalidationVersionMap;
21 21
22 class InvalidationStateTracker { 22 class InvalidationStateTracker {
23 public: 23 public:
24 InvalidationStateTracker() {} 24 InvalidationStateTracker() {}
25 25
26 virtual InvalidationVersionMap GetAllMaxVersions() const = 0; 26 virtual InvalidationVersionMap GetAllMaxVersions() const = 0;
27 27
28 // |max_version| should be strictly greater than any existing max 28 // |max_version| should be strictly greater than any existing max
29 // version for |model_type|. 29 // version for |model_type|.
30 virtual void SetMaxVersion(const invalidation::ObjectId& id, 30 virtual void SetMaxVersion(const invalidation::ObjectId& id,
31 int64 max_version) = 0; 31 int64 max_version) = 0;
32 32
33 // Used by InvalidationClient for persistence. |state| is opaque data we can 33 // Used by InvalidationClient for persistence. |state| is opaque data we can
34 // present back to the client (e.g. after a restart) for it to bootstrap 34 // present back to the client (e.g. after a restart) for it to bootstrap
35 // itself. 35 // itself.
36 // |state| is plain old data (not valid UTF8, embedded nulls, etc). 36 // |state| is plain old data (not valid UTF8, embedded nulls, etc).
37 virtual void SetInvalidationState(const std::string& state) = 0; 37 virtual void SetInvalidationState(const std::string& state) = 0;
38 virtual std::string GetInvalidationState() const = 0; 38 virtual std::string GetInvalidationState() const = 0;
39 39
40 protected: 40 protected:
41 virtual ~InvalidationStateTracker() {} 41 virtual ~InvalidationStateTracker() {}
42 }; 42 };
43 43
44 } // namespace csync 44 } // namespace syncer
45 45
46 #endif // SYNC_NOTIFIER_INVALIDATION_STATE_TRACKER_H_ 46 #endif // SYNC_NOTIFIER_INVALIDATION_STATE_TRACKER_H_
OLDNEW
« no previous file with comments | « sync/notifier/invalidation_notifier_unittest.cc ('k') | sync/notifier/invalidation_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698