| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_SYNC_BRIDGE_H_ | 5 #ifndef COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_SYNC_BRIDGE_H_ |
| 6 #define COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_SYNC_BRIDGE_H_ | 6 #define COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_SYNC_BRIDGE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // Registered observers, not owned. | 131 // Registered observers, not owned. |
| 132 base::ObserverList<Observer, true> observers_; | 132 base::ObserverList<Observer, true> observers_; |
| 133 | 133 |
| 134 // Used to listen for provider initialization. If the provider is already | 134 // Used to listen for provider initialization. If the provider is already |
| 135 // initialized during our constructor then the subscription is never used. | 135 // initialized during our constructor then the subscription is never used. |
| 136 std::unique_ptr<LocalDeviceInfoProvider::Subscription> subscription_; | 136 std::unique_ptr<LocalDeviceInfoProvider::Subscription> subscription_; |
| 137 | 137 |
| 138 // In charge of actually persiting changes to disk, or loading previous data. | 138 // In charge of actually persiting changes to disk, or loading previous data. |
| 139 std::unique_ptr<ModelTypeStore> store_; | 139 std::unique_ptr<ModelTypeStore> store_; |
| 140 | 140 |
| 141 // If |local_device_info_provider_| has initialized. | |
| 142 bool has_provider_initialized_ = false; | |
| 143 // If data has been loaded from the store. | 141 // If data has been loaded from the store. |
| 144 bool has_data_loaded_ = false; | 142 bool has_data_loaded_ = false; |
| 145 | 143 |
| 146 // Used to update our local device info once every pulse interval. | 144 // Used to update our local device info once every pulse interval. |
| 147 base::OneShotTimer pulse_timer_; | 145 base::OneShotTimer pulse_timer_; |
| 148 | 146 |
| 149 DISALLOW_COPY_AND_ASSIGN(DeviceInfoSyncBridge); | 147 DISALLOW_COPY_AND_ASSIGN(DeviceInfoSyncBridge); |
| 150 }; | 148 }; |
| 151 | 149 |
| 152 } // namespace syncer | 150 } // namespace syncer |
| 153 | 151 |
| 154 #endif // COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_SYNC_BRIDGE_H_ | 152 #endif // COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_SYNC_BRIDGE_H_ |
| OLD | NEW |