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 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 const UnackedInvalidationsMap& saved_invalidations, | 46 const UnackedInvalidationsMap& saved_invalidations, |
47 const std::string& invalidation_bootstrap_data, | 47 const std::string& invalidation_bootstrap_data, |
48 const base::WeakPtr<InvalidationStateTracker>& invalidation_state_tracker, | 48 const base::WeakPtr<InvalidationStateTracker>& invalidation_state_tracker, |
49 scoped_refptr<base::SingleThreadTaskRunner> | 49 scoped_refptr<base::SingleThreadTaskRunner> |
50 invalidation_state_tracker_task_runner, | 50 invalidation_state_tracker_task_runner, |
51 const std::string& client_info); | 51 const std::string& client_info); |
52 | 52 |
53 virtual ~InvalidationNotifier(); | 53 virtual ~InvalidationNotifier(); |
54 | 54 |
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 InvalidatorState GetInvalidatorState() const OVERRIDE; | 60 virtual InvalidatorState GetInvalidatorState() const override; |
61 virtual void UpdateCredentials( | 61 virtual void UpdateCredentials( |
62 const std::string& email, const std::string& token) OVERRIDE; | 62 const std::string& email, const std::string& token) override; |
63 virtual void RequestDetailedStatus( | 63 virtual void RequestDetailedStatus( |
64 base::Callback<void(const base::DictionaryValue&)> callback) const | 64 base::Callback<void(const base::DictionaryValue&)> callback) const |
65 OVERRIDE; | 65 override; |
66 | 66 |
67 // SyncInvalidationListener::Delegate implementation. | 67 // SyncInvalidationListener::Delegate implementation. |
68 virtual void OnInvalidate( | 68 virtual void OnInvalidate( |
69 const ObjectIdInvalidationMap& invalidation_map) OVERRIDE; | 69 const ObjectIdInvalidationMap& invalidation_map) override; |
70 virtual void OnInvalidatorStateChange(InvalidatorState state) OVERRIDE; | 70 virtual void OnInvalidatorStateChange(InvalidatorState state) override; |
71 | 71 |
72 private: | 72 private: |
73 // We start off in the STOPPED state. When we get our initial | 73 // We start off in the STOPPED state. When we get our initial |
74 // credentials, we connect and move to the CONNECTING state. When | 74 // credentials, we connect and move to the CONNECTING state. When |
75 // we're connected we start the invalidation client and move to the | 75 // we're connected we start the invalidation client and move to the |
76 // STARTED state. We never go back to a previous state. | 76 // STARTED state. We never go back to a previous state. |
77 enum State { | 77 enum State { |
78 STOPPED, | 78 STOPPED, |
79 CONNECTING, | 79 CONNECTING, |
80 STARTED | 80 STARTED |
(...skipping 21 matching lines...) Expand all Loading... |
102 | 102 |
103 // The invalidation listener. | 103 // The invalidation listener. |
104 SyncInvalidationListener invalidation_listener_; | 104 SyncInvalidationListener invalidation_listener_; |
105 | 105 |
106 DISALLOW_COPY_AND_ASSIGN(InvalidationNotifier); | 106 DISALLOW_COPY_AND_ASSIGN(InvalidationNotifier); |
107 }; | 107 }; |
108 | 108 |
109 } // namespace syncer | 109 } // namespace syncer |
110 | 110 |
111 #endif // COMPONENTS_INVALIDATION_INVALIDATION_NOTIFIER_H_ | 111 #endif // COMPONENTS_INVALIDATION_INVALIDATION_NOTIFIER_H_ |
OLD | NEW |