| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 123 |
| 124 // notifier::PushClientObserver implementation. | 124 // notifier::PushClientObserver implementation. |
| 125 virtual void OnNotificationsEnabled() OVERRIDE; | 125 virtual void OnNotificationsEnabled() OVERRIDE; |
| 126 virtual void OnNotificationsDisabled( | 126 virtual void OnNotificationsDisabled( |
| 127 notifier::NotificationsDisabledReason reason) OVERRIDE; | 127 notifier::NotificationsDisabledReason reason) OVERRIDE; |
| 128 virtual void OnIncomingNotification( | 128 virtual void OnIncomingNotification( |
| 129 const notifier::Notification& notification) OVERRIDE; | 129 const notifier::Notification& notification) OVERRIDE; |
| 130 | 130 |
| 131 void StopForTest(); | 131 void StopForTest(); |
| 132 | 132 |
| 133 void DoRegistrationUpdate(); |
| 134 |
| 133 private: | 135 private: |
| 134 void Stop(); | 136 void Stop(); |
| 135 | 137 |
| 136 NotificationsDisabledReason GetState() const; | 138 NotificationsDisabledReason GetState() const; |
| 137 | 139 |
| 138 void EmitStateChange(); | 140 void EmitStateChange(); |
| 139 | 141 |
| 140 void EmitInvalidation(const ObjectIdStateMap& id_state_map); | 142 void EmitInvalidation(const ObjectIdStateMap& id_state_map); |
| 141 | 143 |
| 142 // Owned by |chrome_system_resources_|. | 144 // Owned by |chrome_system_resources_|. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 154 // NO_NOTIFICATION_ERROR meaning notifications are enabled). | 156 // NO_NOTIFICATION_ERROR meaning notifications are enabled). |
| 155 NotificationsDisabledReason ticl_state_; | 157 NotificationsDisabledReason ticl_state_; |
| 156 NotificationsDisabledReason push_client_state_; | 158 NotificationsDisabledReason push_client_state_; |
| 157 | 159 |
| 158 DISALLOW_COPY_AND_ASSIGN(ChromeInvalidationClient); | 160 DISALLOW_COPY_AND_ASSIGN(ChromeInvalidationClient); |
| 159 }; | 161 }; |
| 160 | 162 |
| 161 } // namespace syncer | 163 } // namespace syncer |
| 162 | 164 |
| 163 #endif // SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ | 165 #endif // SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ |
| OLD | NEW |