OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_INVALIDATION_P2P_INVALIDATOR_H_ | 8 #ifndef COMPONENTS_INVALIDATION_P2P_INVALIDATOR_H_ |
9 #define COMPONENTS_INVALIDATION_P2P_INVALIDATOR_H_ | 9 #define COMPONENTS_INVALIDATION_P2P_INVALIDATOR_H_ |
10 | 10 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 // to send notifications to all clients except for the one that triggered the | 95 // to send notifications to all clients except for the one that triggered the |
96 // notification. See crbug.com/97780. | 96 // notification. See crbug.com/97780. |
97 P2PInvalidator(scoped_ptr<notifier::PushClient> push_client, | 97 P2PInvalidator(scoped_ptr<notifier::PushClient> push_client, |
98 const std::string& invalidator_client_id, | 98 const std::string& invalidator_client_id, |
99 P2PNotificationTarget send_notification_target); | 99 P2PNotificationTarget send_notification_target); |
100 | 100 |
101 ~P2PInvalidator() override; | 101 ~P2PInvalidator() override; |
102 | 102 |
103 // Invalidator implementation. | 103 // Invalidator implementation. |
104 void RegisterHandler(InvalidationHandler* handler) override; | 104 void RegisterHandler(InvalidationHandler* handler) override; |
105 void UpdateRegisteredIds(InvalidationHandler* handler, | 105 bool UpdateRegisteredIds(InvalidationHandler* handler, |
106 const ObjectIdSet& ids) override; | 106 const ObjectIdSet& ids) override; |
107 void UnregisterHandler(InvalidationHandler* handler) override; | 107 void UnregisterHandler(InvalidationHandler* handler) override; |
108 InvalidatorState GetInvalidatorState() const override; | 108 InvalidatorState GetInvalidatorState() const override; |
109 void UpdateCredentials(const std::string& email, | 109 void UpdateCredentials(const std::string& email, |
110 const std::string& token) override; | 110 const std::string& token) override; |
111 void RequestDetailedStatus(base::Callback<void(const base::DictionaryValue&)> | 111 void RequestDetailedStatus(base::Callback<void(const base::DictionaryValue&)> |
112 callback) const override; | 112 callback) const override; |
113 | 113 |
114 // PushClientObserver implementation. | 114 // PushClientObserver implementation. |
115 void OnNotificationsEnabled() override; | 115 void OnNotificationsEnabled() override; |
(...skipping 23 matching lines...) Expand all Loading... |
139 bool notifications_enabled_; | 139 bool notifications_enabled_; |
140 // Which set of clients should be sent notifications. | 140 // Which set of clients should be sent notifications. |
141 P2PNotificationTarget send_notification_target_; | 141 P2PNotificationTarget send_notification_target_; |
142 | 142 |
143 DISALLOW_COPY_AND_ASSIGN(P2PInvalidator); | 143 DISALLOW_COPY_AND_ASSIGN(P2PInvalidator); |
144 }; | 144 }; |
145 | 145 |
146 } // namespace syncer | 146 } // namespace syncer |
147 | 147 |
148 #endif // COMPONENTS_INVALIDATION_P2P_INVALIDATOR_H_ | 148 #endif // COMPONENTS_INVALIDATION_P2P_INVALIDATOR_H_ |
OLD | NEW |