| OLD | NEW |
| 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 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 virtual InvalidationVersionMap GetAllMaxVersions() const = 0; | 24 virtual InvalidationVersionMap GetAllMaxVersions() const = 0; |
| 25 | 25 |
| 26 // |max_version| should be strictly greater than any existing max | 26 // |max_version| should be strictly greater than any existing max |
| 27 // version for |model_type|. | 27 // version for |model_type|. |
| 28 virtual void SetMaxVersion(syncable::ModelType model_type, | 28 virtual void SetMaxVersion(syncable::ModelType model_type, |
| 29 int64 max_version) = 0; | 29 int64 max_version) = 0; |
| 30 | 30 |
| 31 // Used by InvalidationClient for persistence. |state| is opaque data we can | 31 // Used by InvalidationClient for persistence. |state| is opaque data we can |
| 32 // present back to the client (e.g. after a restart) for it to bootstrap | 32 // present back to the client (e.g. after a restart) for it to bootstrap |
| 33 // itself. | 33 // itself. |
| 34 // |state| is plain old data (not valid UTF8, embedded nulls, etc). |
| 34 virtual void SetInvalidationState(const std::string& state) = 0; | 35 virtual void SetInvalidationState(const std::string& state) = 0; |
| 35 virtual std::string GetInvalidationState() const = 0; | 36 virtual std::string GetInvalidationState() const = 0; |
| 36 | 37 |
| 37 protected: | 38 protected: |
| 38 virtual ~InvalidationStateTracker() {} | 39 virtual ~InvalidationStateTracker() {} |
| 39 }; | 40 }; |
| 40 | 41 |
| 41 } // namespace sync_notifier | 42 } // namespace sync_notifier |
| 42 | 43 |
| 43 #endif // SYNC_NOTIFIER_INVALIDATION_STATE_TRACKER_H_ | 44 #endif // SYNC_NOTIFIER_INVALIDATION_STATE_TRACKER_H_ |
| OLD | NEW |