| 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 // 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_SYNC_INVALIDATION_LISTENER_H_ | 8 #ifndef SYNC_NOTIFIER_SYNC_INVALIDATION_LISTENER_H_ |
| 9 #define SYNC_NOTIFIER_SYNC_INVALIDATION_LISTENER_H_ | 9 #define SYNC_NOTIFIER_SYNC_INVALIDATION_LISTENER_H_ |
| 10 | 10 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 AckTracker* GetAckTrackerForTest(); | 144 AckTracker* GetAckTrackerForTest(); |
| 145 | 145 |
| 146 private: | 146 private: |
| 147 void Stop(); | 147 void Stop(); |
| 148 | 148 |
| 149 InvalidatorState GetState() const; | 149 InvalidatorState GetState() const; |
| 150 | 150 |
| 151 void EmitStateChange(); | 151 void EmitStateChange(); |
| 152 | 152 |
| 153 void PrepareInvalidation(const ObjectIdSet& ids, | 153 void PrepareInvalidation(const ObjectIdSet& ids, |
| 154 int64 version, |
| 154 const std::string& payload, | 155 const std::string& payload, |
| 155 invalidation::InvalidationClient* client, | 156 invalidation::InvalidationClient* client, |
| 156 const invalidation::AckHandle& ack_handle); | 157 const invalidation::AckHandle& ack_handle); |
| 157 void EmitInvalidation(const ObjectIdSet& ids, | 158 void EmitInvalidation(const ObjectIdSet& ids, |
| 159 int64 version, |
| 158 const std::string& payload, | 160 const std::string& payload, |
| 159 invalidation::InvalidationClient* client, | 161 invalidation::InvalidationClient* client, |
| 160 const invalidation::AckHandle& ack_handle, | 162 const invalidation::AckHandle& ack_handle, |
| 161 const AckHandleMap& local_ack_handles); | 163 const AckHandleMap& local_ack_handles); |
| 162 | 164 |
| 163 // AckTracker::Delegate implementation. | 165 // AckTracker::Delegate implementation. |
| 164 virtual void OnTimeout(const ObjectIdSet& ids) OVERRIDE; | 166 virtual void OnTimeout(const ObjectIdSet& ids) OVERRIDE; |
| 165 | 167 |
| 166 base::WeakPtrFactory<SyncInvalidationListener> weak_ptr_factory_; | 168 base::WeakPtrFactory<SyncInvalidationListener> weak_ptr_factory_; |
| 167 AckTracker ack_tracker_; | 169 AckTracker ack_tracker_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 180 // The states of the ticl and the push client. | 182 // The states of the ticl and the push client. |
| 181 InvalidatorState ticl_state_; | 183 InvalidatorState ticl_state_; |
| 182 InvalidatorState push_client_state_; | 184 InvalidatorState push_client_state_; |
| 183 | 185 |
| 184 DISALLOW_COPY_AND_ASSIGN(SyncInvalidationListener); | 186 DISALLOW_COPY_AND_ASSIGN(SyncInvalidationListener); |
| 185 }; | 187 }; |
| 186 | 188 |
| 187 } // namespace syncer | 189 } // namespace syncer |
| 188 | 190 |
| 189 #endif // SYNC_NOTIFIER_SYNC_INVALIDATION_LISTENER_H_ | 191 #endif // SYNC_NOTIFIER_SYNC_INVALIDATION_LISTENER_H_ |
| OLD | NEW |