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 // Wraps PrefService in an InvalidationStateTracker to allow SyncNotifiers | 5 // Wraps PrefService in an InvalidationStateTracker to allow SyncNotifiers |
6 // to use PrefService as persistence for invalidation state. It is not thread | 6 // to use PrefService as persistence for invalidation state. It is not thread |
7 // safe, and lives on the UI thread. | 7 // safe, and lives on the UI thread. |
8 | 8 |
9 #ifndef CHROME_BROWSER_SYNC_INVALIDATIONS_INVALIDATOR_STORAGE_H_ | 9 #ifndef CHROME_BROWSER_SYNC_INVALIDATIONS_INVALIDATOR_STORAGE_H_ |
10 #define CHROME_BROWSER_SYNC_INVALIDATIONS_INVALIDATOR_STORAGE_H_ | 10 #define CHROME_BROWSER_SYNC_INVALIDATIONS_INVALIDATOR_STORAGE_H_ |
(...skipping 29 matching lines...) Expand all Loading... |
40 // Erases invalidation versions and state stored on disk. | 40 // Erases invalidation versions and state stored on disk. |
41 void Clear(); | 41 void Clear(); |
42 | 42 |
43 // InvalidationStateTracker implementation. | 43 // InvalidationStateTracker implementation. |
44 virtual syncer::InvalidationStateMap GetAllInvalidationStates() const | 44 virtual syncer::InvalidationStateMap GetAllInvalidationStates() const |
45 OVERRIDE; | 45 OVERRIDE; |
46 virtual void SetMaxVersionAndPayload(const invalidation::ObjectId& id, | 46 virtual void SetMaxVersionAndPayload(const invalidation::ObjectId& id, |
47 int64 max_version, | 47 int64 max_version, |
48 const std::string& payload) OVERRIDE; | 48 const std::string& payload) OVERRIDE; |
49 virtual void Forget(const syncer::ObjectIdSet& ids) OVERRIDE; | 49 virtual void Forget(const syncer::ObjectIdSet& ids) OVERRIDE; |
| 50 virtual void SetInvalidatorClientId(const std::string& client_id) OVERRIDE; |
| 51 virtual std::string GetInvalidatorClientId() const OVERRIDE; |
50 virtual void SetBootstrapData(const std::string& data) OVERRIDE; | 52 virtual void SetBootstrapData(const std::string& data) OVERRIDE; |
51 virtual std::string GetBootstrapData() const OVERRIDE; | 53 virtual std::string GetBootstrapData() const OVERRIDE; |
52 virtual void GenerateAckHandles( | 54 virtual void GenerateAckHandles( |
53 const syncer::ObjectIdSet& ids, | 55 const syncer::ObjectIdSet& ids, |
54 const scoped_refptr<base::TaskRunner>& task_runner, | 56 const scoped_refptr<base::TaskRunner>& task_runner, |
55 base::Callback<void(const syncer::AckHandleMap&)> callback) OVERRIDE; | 57 base::Callback<void(const syncer::AckHandleMap&)> callback) OVERRIDE; |
56 virtual void Acknowledge(const invalidation::ObjectId& id, | 58 virtual void Acknowledge(const invalidation::ObjectId& id, |
57 const syncer::AckHandle& ack_handle) OVERRIDE; | 59 const syncer::AckHandle& ack_handle) OVERRIDE; |
58 | 60 |
59 private: | 61 private: |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 96 |
95 // May be NULL. | 97 // May be NULL. |
96 PrefServiceSyncable* const pref_service_; | 98 PrefServiceSyncable* const pref_service_; |
97 | 99 |
98 DISALLOW_COPY_AND_ASSIGN(InvalidatorStorage); | 100 DISALLOW_COPY_AND_ASSIGN(InvalidatorStorage); |
99 }; | 101 }; |
100 | 102 |
101 } // namespace browser_sync | 103 } // namespace browser_sync |
102 | 104 |
103 #endif // CHROME_BROWSER_SYNC_INVALIDATIONS_INVALIDATOR_STORAGE_H_ | 105 #endif // CHROME_BROWSER_SYNC_INVALIDATIONS_INVALIDATOR_STORAGE_H_ |
OLD | NEW |