| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 const syncer::ObjectIdSet& ids) = 0; | 69 const syncer::ObjectIdSet& ids) = 0; |
| 70 | 70 |
| 71 // Stops sending notifications to |handler|. |handler| must not be NULL, and | 71 // Stops sending notifications to |handler|. |handler| must not be NULL, and |
| 72 // it must already be registered. Note that this doesn't unregister the IDs | 72 // it must already be registered. Note that this doesn't unregister the IDs |
| 73 // associated with |handler|. | 73 // associated with |handler|. |
| 74 // | 74 // |
| 75 // Handler registrations are persisted across restarts of sync. | 75 // Handler registrations are persisted across restarts of sync. |
| 76 virtual void UnregisterInvalidationHandler( | 76 virtual void UnregisterInvalidationHandler( |
| 77 syncer::InvalidationHandler* handler) = 0; | 77 syncer::InvalidationHandler* handler) = 0; |
| 78 | 78 |
| 79 // TODO(dcheng): Add a comment. |
| 80 virtual void AcknowledgeInvalidation(const invalidation::ObjectId& id, |
| 81 const syncer::AckHandle& ack_handle) = 0; |
| 82 |
| 79 // Returns the current invalidator state. When called from within | 83 // Returns the current invalidator state. When called from within |
| 80 // InvalidationHandler::OnInvalidatorStateChange(), this must return | 84 // InvalidationHandler::OnInvalidatorStateChange(), this must return |
| 81 // the updated state. | 85 // the updated state. |
| 82 virtual syncer::InvalidatorState GetInvalidatorState() const = 0; | 86 virtual syncer::InvalidatorState GetInvalidatorState() const = 0; |
| 83 | 87 |
| 84 protected: | 88 protected: |
| 85 virtual ~InvalidationFrontend() { } | 89 virtual ~InvalidationFrontend() { } |
| 86 }; | 90 }; |
| 87 | 91 |
| 88 #endif // CHROME_BROWSER_SYNC_INVALIDATION_FRONTEND_H_ | 92 #endif // CHROME_BROWSER_SYNC_INVALIDATION_FRONTEND_H_ |
| OLD | NEW |