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 // Simple system resources class that uses the current message loop | 5 // Simple system resources class that uses the current message loop |
6 // for scheduling. Assumes the current message loop is already | 6 // for scheduling. Assumes the current message loop is already |
7 // running. | 7 // running. |
8 | 8 |
9 #ifndef COMPONENTS_INVALIDATION_SYNC_SYSTEM_RESOURCES_H_ | 9 #ifndef COMPONENTS_INVALIDATION_SYNC_SYSTEM_RESOURCES_H_ |
10 #define COMPONENTS_INVALIDATION_SYNC_SYSTEM_RESOURCES_H_ | 10 #define COMPONENTS_INVALIDATION_SYNC_SYSTEM_RESOURCES_H_ |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 164 |
165 // Callbacks into invalidation library | 165 // Callbacks into invalidation library |
166 scoped_ptr<invalidation::MessageCallback> incoming_receiver_; | 166 scoped_ptr<invalidation::MessageCallback> incoming_receiver_; |
167 NetworkStatusReceiverList network_status_receivers_; | 167 NetworkStatusReceiverList network_status_receivers_; |
168 | 168 |
169 // Last network status for new network status receivers. | 169 // Last network status for new network status receivers. |
170 bool last_network_status_; | 170 bool last_network_status_; |
171 | 171 |
172 int received_messages_count_; | 172 int received_messages_count_; |
173 | 173 |
174 ObserverList<Observer> observers_; | 174 base::ObserverList<Observer> observers_; |
175 }; | 175 }; |
176 | 176 |
177 class SyncStorage : public invalidation::Storage { | 177 class SyncStorage : public invalidation::Storage { |
178 public: | 178 public: |
179 SyncStorage(StateWriter* state_writer, invalidation::Scheduler* scheduler); | 179 SyncStorage(StateWriter* state_writer, invalidation::Scheduler* scheduler); |
180 | 180 |
181 ~SyncStorage() override; | 181 ~SyncStorage() override; |
182 | 182 |
183 void SetInitialState(const std::string& value) { | 183 void SetInitialState(const std::string& value) { |
184 cached_state_ = value; | 184 cached_state_ = value; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 scoped_ptr<SyncInvalidationScheduler> internal_scheduler_; | 240 scoped_ptr<SyncInvalidationScheduler> internal_scheduler_; |
241 scoped_ptr<SyncInvalidationScheduler> listener_scheduler_; | 241 scoped_ptr<SyncInvalidationScheduler> listener_scheduler_; |
242 scoped_ptr<SyncStorage> storage_; | 242 scoped_ptr<SyncStorage> storage_; |
243 // sync_network_channel_ is owned by SyncInvalidationListener. | 243 // sync_network_channel_ is owned by SyncInvalidationListener. |
244 SyncNetworkChannel* sync_network_channel_; | 244 SyncNetworkChannel* sync_network_channel_; |
245 }; | 245 }; |
246 | 246 |
247 } // namespace syncer | 247 } // namespace syncer |
248 | 248 |
249 #endif // COMPONENTS_INVALIDATION_SYNC_SYSTEM_RESOURCES_H_ | 249 #endif // COMPONENTS_INVALIDATION_SYNC_SYSTEM_RESOURCES_H_ |
OLD | NEW |