| 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 // An implementation of SyncNotifier that wraps an invalidation | 5 // An implementation of SyncNotifier that wraps an invalidation |
| 6 // client. Handles the details of connecting to XMPP and hooking it | 6 // client. Handles the details of connecting to XMPP and hooking it |
| 7 // up to the invalidation client. | 7 // up to the invalidation client. |
| 8 // | 8 // |
| 9 // You probably don't want to use this directly; use | 9 // You probably don't want to use this directly; use |
| 10 // NonBlockingInvalidationNotifier. | 10 // NonBlockingInvalidationNotifier. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 virtual void UpdateRegisteredIds(SyncNotifierObserver* handler, | 53 virtual void UpdateRegisteredIds(SyncNotifierObserver* handler, |
| 54 const ObjectIdSet& ids) OVERRIDE; | 54 const ObjectIdSet& ids) OVERRIDE; |
| 55 virtual void UnregisterHandler(SyncNotifierObserver* handler) OVERRIDE; | 55 virtual void UnregisterHandler(SyncNotifierObserver* handler) OVERRIDE; |
| 56 virtual void SetUniqueId(const std::string& unique_id) OVERRIDE; | 56 virtual void SetUniqueId(const std::string& unique_id) OVERRIDE; |
| 57 virtual void SetStateDeprecated(const std::string& state) OVERRIDE; | 57 virtual void SetStateDeprecated(const std::string& state) OVERRIDE; |
| 58 virtual void UpdateCredentials( | 58 virtual void UpdateCredentials( |
| 59 const std::string& email, const std::string& token) OVERRIDE; | 59 const std::string& email, const std::string& token) OVERRIDE; |
| 60 virtual void SendNotification(ModelTypeSet changed_types) OVERRIDE; | 60 virtual void SendNotification(ModelTypeSet changed_types) OVERRIDE; |
| 61 | 61 |
| 62 // ChromeInvalidationClient::Listener implementation. | 62 // ChromeInvalidationClient::Listener implementation. |
| 63 virtual void OnInvalidate(const ObjectIdPayloadMap& id_payloads) OVERRIDE; | 63 virtual void OnInvalidate(const ObjectIdStateMap& id_state_map) OVERRIDE; |
| 64 virtual void OnNotificationsEnabled() OVERRIDE; | 64 virtual void OnNotificationsEnabled() OVERRIDE; |
| 65 virtual void OnNotificationsDisabled( | 65 virtual void OnNotificationsDisabled( |
| 66 NotificationsDisabledReason reason) OVERRIDE; | 66 NotificationsDisabledReason reason) OVERRIDE; |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 // We start off in the STOPPED state. When we get our initial | 69 // We start off in the STOPPED state. When we get our initial |
| 70 // credentials, we connect and move to the CONNECTING state. When | 70 // credentials, we connect and move to the CONNECTING state. When |
| 71 // we're connected we start the invalidation client and move to the | 71 // we're connected we start the invalidation client and move to the |
| 72 // STARTED state. We never go back to a previous state. | 72 // STARTED state. We never go back to a previous state. |
| 73 enum State { | 73 enum State { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 99 | 99 |
| 100 // The invalidation client. | 100 // The invalidation client. |
| 101 ChromeInvalidationClient invalidation_client_; | 101 ChromeInvalidationClient invalidation_client_; |
| 102 | 102 |
| 103 DISALLOW_COPY_AND_ASSIGN(InvalidationNotifier); | 103 DISALLOW_COPY_AND_ASSIGN(InvalidationNotifier); |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 } // namespace syncer | 106 } // namespace syncer |
| 107 | 107 |
| 108 #endif // SYNC_NOTIFIER_INVALIDATION_NOTIFIER_H_ | 108 #endif // SYNC_NOTIFIER_INVALIDATION_NOTIFIER_H_ |
| OLD | NEW |