OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef SYNC_NOTIFIER_UNACKED_INVALIDATION_SET_H_ | 5 #ifndef SYNC_NOTIFIER_UNACKED_INVALIDATION_SET_H_ |
6 #define SYNC_NOTIFIER_UNACKED_INVALIDATION_SET_H_ | 6 #define SYNC_NOTIFIER_UNACKED_INVALIDATION_SET_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "sync/base/sync_export.h" | 10 #include "sync/base/sync_export.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 class AckHandle; | 27 class AckHandle; |
28 | 28 |
29 // Manages the set of invalidations that are awaiting local acknowledgement for | 29 // Manages the set of invalidations that are awaiting local acknowledgement for |
30 // a particular ObjectId. This set of invalidations will be persisted across | 30 // a particular ObjectId. This set of invalidations will be persisted across |
31 // restarts, though this class is not directly responsible for that. | 31 // restarts, though this class is not directly responsible for that. |
32 class SYNC_EXPORT UnackedInvalidationSet { | 32 class SYNC_EXPORT UnackedInvalidationSet { |
33 public: | 33 public: |
34 static const size_t kMaxBufferedInvalidations; | 34 static const size_t kMaxBufferedInvalidations; |
35 | 35 |
36 UnackedInvalidationSet(invalidation::ObjectId id); | 36 UnackedInvalidationSet(invalidation::ObjectId id); |
| 37 UnackedInvalidationSet(const UnackedInvalidationSet& other); |
37 ~UnackedInvalidationSet(); | 38 ~UnackedInvalidationSet(); |
38 | 39 |
39 // Returns the ObjectID of the invalidations this class is tracking. | 40 // Returns the ObjectID of the invalidations this class is tracking. |
40 const invalidation::ObjectId& object_id() const; | 41 const invalidation::ObjectId& object_id() const; |
41 | 42 |
42 // Adds a new invalidation to the set awaiting acknowledgement. | 43 // Adds a new invalidation to the set awaiting acknowledgement. |
43 void Add(const Invalidation& invalidation); | 44 void Add(const Invalidation& invalidation); |
44 | 45 |
45 // Adds many new invalidations to the set awaiting acknowledgement. | 46 // Adds many new invalidations to the set awaiting acknowledgement. |
46 void AddSet(const SingleObjectInvalidationSet& invalidations); | 47 void AddSet(const SingleObjectInvalidationSet& invalidations); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 InvalidationsSet invalidations_; | 109 InvalidationsSet invalidations_; |
109 }; | 110 }; |
110 | 111 |
111 typedef std::map<invalidation::ObjectId, | 112 typedef std::map<invalidation::ObjectId, |
112 UnackedInvalidationSet, | 113 UnackedInvalidationSet, |
113 ObjectIdLessThan> UnackedInvalidationsMap; | 114 ObjectIdLessThan> UnackedInvalidationsMap; |
114 | 115 |
115 } // namespace syncer | 116 } // namespace syncer |
116 | 117 |
117 #endif // SYNC_NOTIFIER_UNACKED_INVALIDATION_SET_H_ | 118 #endif // SYNC_NOTIFIER_UNACKED_INVALIDATION_SET_H_ |
OLD | NEW |