| 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 // A simple wrapper around invalidation::InvalidationClient that | 5 // A simple wrapper around invalidation::InvalidationClient that |
| 6 // handles all the startup/shutdown details and hookups. | 6 // handles all the startup/shutdown details and hookups. |
| 7 | 7 |
| 8 #ifndef SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ | 8 #ifndef SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ |
| 9 #define SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ | 9 #define SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ |
| 10 | 10 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // notifier::PushClientObserver implementation. | 114 // notifier::PushClientObserver implementation. |
| 115 virtual void OnNotificationsEnabled() OVERRIDE; | 115 virtual void OnNotificationsEnabled() OVERRIDE; |
| 116 virtual void OnNotificationsDisabled( | 116 virtual void OnNotificationsDisabled( |
| 117 notifier::NotificationsDisabledReason reason) OVERRIDE; | 117 notifier::NotificationsDisabledReason reason) OVERRIDE; |
| 118 virtual void OnIncomingNotification( | 118 virtual void OnIncomingNotification( |
| 119 const notifier::Notification& notification) OVERRIDE; | 119 const notifier::Notification& notification) OVERRIDE; |
| 120 | 120 |
| 121 private: | 121 private: |
| 122 friend class ChromeInvalidationClientTest; | 122 friend class ChromeInvalidationClientTest; |
| 123 | 123 |
| 124 void DoRegistrationUpdate(); |
| 125 |
| 124 void Stop(); | 126 void Stop(); |
| 125 | 127 |
| 126 NotificationsDisabledReason GetState() const; | 128 NotificationsDisabledReason GetState() const; |
| 127 | 129 |
| 128 void EmitStateChange(); | 130 void EmitStateChange(); |
| 129 | 131 |
| 130 void EmitInvalidation(const ObjectIdPayloadMap& id_payloads); | 132 void EmitInvalidation(const ObjectIdPayloadMap& id_payloads); |
| 131 | 133 |
| 132 // Owned by |chrome_system_resources_|. | 134 // Owned by |chrome_system_resources_|. |
| 133 notifier::PushClient* const push_client_; | 135 notifier::PushClient* const push_client_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 144 // NO_NOTIFICATION_ERROR meaning notifications are enabled). | 146 // NO_NOTIFICATION_ERROR meaning notifications are enabled). |
| 145 NotificationsDisabledReason ticl_state_; | 147 NotificationsDisabledReason ticl_state_; |
| 146 NotificationsDisabledReason push_client_state_; | 148 NotificationsDisabledReason push_client_state_; |
| 147 | 149 |
| 148 DISALLOW_COPY_AND_ASSIGN(ChromeInvalidationClient); | 150 DISALLOW_COPY_AND_ASSIGN(ChromeInvalidationClient); |
| 149 }; | 151 }; |
| 150 | 152 |
| 151 } // namespace syncer | 153 } // namespace syncer |
| 152 | 154 |
| 153 #endif // SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ | 155 #endif // SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ |
| OLD | NEW |