| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 invalidator that uses p2p invalidations based on XMPP push | 5 // An invalidator that uses p2p invalidations based on XMPP push |
| 6 // notifications. Used only for sync integration tests. | 6 // notifications. Used only for sync integration tests. |
| 7 | 7 |
| 8 #ifndef SYNC_NOTIFIER_P2P_INVALIDATOR_H_ | 8 #ifndef SYNC_NOTIFIER_P2P_INVALIDATOR_H_ |
| 9 #define SYNC_NOTIFIER_P2P_INVALIDATOR_H_ | 9 #define SYNC_NOTIFIER_P2P_INVALIDATOR_H_ |
| 10 | 10 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 P2PInvalidator(scoped_ptr<notifier::PushClient> push_client, | 95 P2PInvalidator(scoped_ptr<notifier::PushClient> push_client, |
| 96 P2PNotificationTarget send_notification_target); | 96 P2PNotificationTarget send_notification_target); |
| 97 | 97 |
| 98 virtual ~P2PInvalidator(); | 98 virtual ~P2PInvalidator(); |
| 99 | 99 |
| 100 // Invalidator implementation. | 100 // Invalidator implementation. |
| 101 virtual void RegisterHandler(InvalidationHandler* handler) OVERRIDE; | 101 virtual void RegisterHandler(InvalidationHandler* handler) OVERRIDE; |
| 102 virtual void UpdateRegisteredIds(InvalidationHandler* handler, | 102 virtual void UpdateRegisteredIds(InvalidationHandler* handler, |
| 103 const ObjectIdSet& ids) OVERRIDE; | 103 const ObjectIdSet& ids) OVERRIDE; |
| 104 virtual void UnregisterHandler(InvalidationHandler* handler) OVERRIDE; | 104 virtual void UnregisterHandler(InvalidationHandler* handler) OVERRIDE; |
| 105 virtual void Acknowledge(const invalidation::ObjectId& id, |
| 106 const AckHandle& ack_handle) OVERRIDE; |
| 105 virtual InvalidatorState GetInvalidatorState() const OVERRIDE; | 107 virtual InvalidatorState GetInvalidatorState() const OVERRIDE; |
| 106 virtual void SetUniqueId(const std::string& unique_id) OVERRIDE; | 108 virtual void SetUniqueId(const std::string& unique_id) OVERRIDE; |
| 107 virtual void UpdateCredentials( | 109 virtual void UpdateCredentials( |
| 108 const std::string& email, const std::string& token) OVERRIDE; | 110 const std::string& email, const std::string& token) OVERRIDE; |
| 109 virtual void SendInvalidation( | 111 virtual void SendInvalidation( |
| 110 const ObjectIdInvalidationMap& invalidation_map) OVERRIDE; | 112 const ObjectIdInvalidationMap& invalidation_map) OVERRIDE; |
| 111 | 113 |
| 112 // PushClientObserver implementation. | 114 // PushClientObserver implementation. |
| 113 virtual void OnNotificationsEnabled() OVERRIDE; | 115 virtual void OnNotificationsEnabled() OVERRIDE; |
| 114 virtual void OnNotificationsDisabled( | 116 virtual void OnNotificationsDisabled( |
| (...skipping 20 matching lines...) Expand all Loading... |
| 135 bool notifications_enabled_; | 137 bool notifications_enabled_; |
| 136 // Which set of clients should be sent notifications. | 138 // Which set of clients should be sent notifications. |
| 137 P2PNotificationTarget send_notification_target_; | 139 P2PNotificationTarget send_notification_target_; |
| 138 | 140 |
| 139 DISALLOW_COPY_AND_ASSIGN(P2PInvalidator); | 141 DISALLOW_COPY_AND_ASSIGN(P2PInvalidator); |
| 140 }; | 142 }; |
| 141 | 143 |
| 142 } // namespace syncer | 144 } // namespace syncer |
| 143 | 145 |
| 144 #endif // SYNC_NOTIFIER_P2P_INVALIDATOR_H_ | 146 #endif // SYNC_NOTIFIER_P2P_INVALIDATOR_H_ |
| OLD | NEW |