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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 const std::string& invalidator_client_id, | 99 const std::string& invalidator_client_id, |
100 P2PNotificationTarget send_notification_target); | 100 P2PNotificationTarget send_notification_target); |
101 | 101 |
102 virtual ~P2PInvalidator(); | 102 virtual ~P2PInvalidator(); |
103 | 103 |
104 // Invalidator implementation. | 104 // Invalidator implementation. |
105 virtual void RegisterHandler(InvalidationHandler* handler) OVERRIDE; | 105 virtual void RegisterHandler(InvalidationHandler* handler) OVERRIDE; |
106 virtual void UpdateRegisteredIds(InvalidationHandler* handler, | 106 virtual void UpdateRegisteredIds(InvalidationHandler* handler, |
107 const ObjectIdSet& ids) OVERRIDE; | 107 const ObjectIdSet& ids) OVERRIDE; |
108 virtual void UnregisterHandler(InvalidationHandler* handler) OVERRIDE; | 108 virtual void UnregisterHandler(InvalidationHandler* handler) OVERRIDE; |
109 virtual void Acknowledge(const invalidation::ObjectId& id, | |
110 const AckHandle& ack_handle) OVERRIDE; | |
111 virtual InvalidatorState GetInvalidatorState() const OVERRIDE; | 109 virtual InvalidatorState GetInvalidatorState() const OVERRIDE; |
112 virtual void UpdateCredentials( | 110 virtual void UpdateCredentials( |
113 const std::string& email, const std::string& token) OVERRIDE; | 111 const std::string& email, const std::string& token) OVERRIDE; |
114 | 112 |
115 // PushClientObserver implementation. | 113 // PushClientObserver implementation. |
116 virtual void OnNotificationsEnabled() OVERRIDE; | 114 virtual void OnNotificationsEnabled() OVERRIDE; |
117 virtual void OnNotificationsDisabled( | 115 virtual void OnNotificationsDisabled( |
118 notifier::NotificationsDisabledReason reason) OVERRIDE; | 116 notifier::NotificationsDisabledReason reason) OVERRIDE; |
119 virtual void OnIncomingNotification( | 117 virtual void OnIncomingNotification( |
120 const notifier::Notification& notification) OVERRIDE; | 118 const notifier::Notification& notification) OVERRIDE; |
(...skipping 19 matching lines...) Expand all Loading... |
140 bool notifications_enabled_; | 138 bool notifications_enabled_; |
141 // Which set of clients should be sent notifications. | 139 // Which set of clients should be sent notifications. |
142 P2PNotificationTarget send_notification_target_; | 140 P2PNotificationTarget send_notification_target_; |
143 | 141 |
144 DISALLOW_COPY_AND_ASSIGN(P2PInvalidator); | 142 DISALLOW_COPY_AND_ASSIGN(P2PInvalidator); |
145 }; | 143 }; |
146 | 144 |
147 } // namespace syncer | 145 } // namespace syncer |
148 | 146 |
149 #endif // SYNC_NOTIFIER_P2P_INVALIDATOR_H_ | 147 #endif // SYNC_NOTIFIER_P2P_INVALIDATOR_H_ |
OLD | NEW |