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 #ifndef CHROME_BROWSER_SYNC_INVALIDATION_FRONTEND_H_ | 5 #ifndef CHROME_BROWSER_SYNC_INVALIDATION_FRONTEND_H_ |
6 #define CHROME_BROWSER_SYNC_INVALIDATION_FRONTEND_H_ | 6 #define CHROME_BROWSER_SYNC_INVALIDATION_FRONTEND_H_ |
7 | 7 |
8 #include "sync/notifier/invalidation_util.h" | 8 #include "sync/notifier/invalidation_util.h" |
9 | 9 |
10 namespace syncer { | 10 namespace syncer { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 const syncer::ObjectIdSet& ids) = 0; | 75 const syncer::ObjectIdSet& ids) = 0; |
76 | 76 |
77 // Stops sending notifications to |handler|. |handler| must not be NULL, and | 77 // Stops sending notifications to |handler|. |handler| must not be NULL, and |
78 // it must already be registered. Note that this doesn't unregister the IDs | 78 // it must already be registered. Note that this doesn't unregister the IDs |
79 // associated with |handler|. | 79 // associated with |handler|. |
80 // | 80 // |
81 // Handler registrations are persisted across restarts of sync. | 81 // Handler registrations are persisted across restarts of sync. |
82 virtual void UnregisterInvalidationHandler( | 82 virtual void UnregisterInvalidationHandler( |
83 syncer::InvalidationHandler* handler) = 0; | 83 syncer::InvalidationHandler* handler) = 0; |
84 | 84 |
| 85 // Sends an acknowledgement that an invalidation for |id| was successfully |
| 86 // handled. |
| 87 virtual void AcknowledgeInvalidation(const invalidation::ObjectId& id, |
| 88 const syncer::AckHandle& ack_handle) = 0; |
| 89 |
85 // Returns the current invalidator state. When called from within | 90 // Returns the current invalidator state. When called from within |
86 // InvalidationHandler::OnInvalidatorStateChange(), this must return | 91 // InvalidationHandler::OnInvalidatorStateChange(), this must return |
87 // the updated state. | 92 // the updated state. |
88 virtual syncer::InvalidatorState GetInvalidatorState() const = 0; | 93 virtual syncer::InvalidatorState GetInvalidatorState() const = 0; |
89 | 94 |
90 protected: | 95 protected: |
91 virtual ~InvalidationFrontend() { } | 96 virtual ~InvalidationFrontend() { } |
92 }; | 97 }; |
93 | 98 |
94 #endif // CHROME_BROWSER_SYNC_INVALIDATION_FRONTEND_H_ | 99 #endif // CHROME_BROWSER_SYNC_INVALIDATION_FRONTEND_H_ |
OLD | NEW |