| 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 implementation of Invalidator that wraps an invalidation | 5 // An implementation of Invalidator 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 // NonBlockingInvalidator. | 10 // NonBlockingInvalidator. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // Invalidator implementation. | 55 // Invalidator implementation. |
| 56 virtual void RegisterHandler(InvalidationHandler* handler) OVERRIDE; | 56 virtual void RegisterHandler(InvalidationHandler* handler) OVERRIDE; |
| 57 virtual void UpdateRegisteredIds(InvalidationHandler* handler, | 57 virtual void UpdateRegisteredIds(InvalidationHandler* handler, |
| 58 const ObjectIdSet& ids) OVERRIDE; | 58 const ObjectIdSet& ids) OVERRIDE; |
| 59 virtual void UnregisterHandler(InvalidationHandler* handler) OVERRIDE; | 59 virtual void UnregisterHandler(InvalidationHandler* handler) OVERRIDE; |
| 60 virtual void Acknowledge(const invalidation::ObjectId& id, | 60 virtual void Acknowledge(const invalidation::ObjectId& id, |
| 61 const AckHandle& ack_handle) OVERRIDE; | 61 const AckHandle& ack_handle) OVERRIDE; |
| 62 virtual InvalidatorState GetInvalidatorState() const OVERRIDE; | 62 virtual InvalidatorState GetInvalidatorState() const OVERRIDE; |
| 63 virtual void UpdateCredentials( | 63 virtual void UpdateCredentials( |
| 64 const std::string& email, const std::string& token) OVERRIDE; | 64 const std::string& email, const std::string& token) OVERRIDE; |
| 65 virtual void SendInvalidation( | |
| 66 const ObjectIdInvalidationMap& invalidation_map) OVERRIDE; | |
| 67 | 65 |
| 68 // SyncInvalidationListener::Delegate implementation. | 66 // SyncInvalidationListener::Delegate implementation. |
| 69 virtual void OnInvalidate( | 67 virtual void OnInvalidate( |
| 70 const ObjectIdInvalidationMap& invalidation_map) OVERRIDE; | 68 const ObjectIdInvalidationMap& invalidation_map) OVERRIDE; |
| 71 virtual void OnInvalidatorStateChange(InvalidatorState state) OVERRIDE; | 69 virtual void OnInvalidatorStateChange(InvalidatorState state) OVERRIDE; |
| 72 | 70 |
| 73 private: | 71 private: |
| 74 // We start off in the STOPPED state. When we get our initial | 72 // We start off in the STOPPED state. When we get our initial |
| 75 // credentials, we connect and move to the CONNECTING state. When | 73 // credentials, we connect and move to the CONNECTING state. When |
| 76 // we're connected we start the invalidation client and move to the | 74 // we're connected we start the invalidation client and move to the |
| (...skipping 29 matching lines...) Expand all Loading... |
| 106 | 104 |
| 107 // The invalidation listener. | 105 // The invalidation listener. |
| 108 SyncInvalidationListener invalidation_listener_; | 106 SyncInvalidationListener invalidation_listener_; |
| 109 | 107 |
| 110 DISALLOW_COPY_AND_ASSIGN(InvalidationNotifier); | 108 DISALLOW_COPY_AND_ASSIGN(InvalidationNotifier); |
| 111 }; | 109 }; |
| 112 | 110 |
| 113 } // namespace syncer | 111 } // namespace syncer |
| 114 | 112 |
| 115 #endif // SYNC_NOTIFIER_INVALIDATION_NOTIFIER_H_ | 113 #endif // SYNC_NOTIFIER_INVALIDATION_NOTIFIER_H_ |
| OLD | NEW |