| 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 #ifndef COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_SYNC_SERVICE_H_ | 5 #ifndef COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_SYNC_SERVICE_H_ |
| 6 #define COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_SYNC_SERVICE_H_ | 6 #define COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_SYNC_SERVICE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 83 |
| 84 // |local_device_info_provider_| isn't owned. | 84 // |local_device_info_provider_| isn't owned. |
| 85 const LocalDeviceInfoProvider* const local_device_info_provider_; | 85 const LocalDeviceInfoProvider* const local_device_info_provider_; |
| 86 | 86 |
| 87 // Receives ownership of |sync_processor_| and |error_handler_| in | 87 // Receives ownership of |sync_processor_| and |error_handler_| in |
| 88 // MergeDataAndStartSyncing() and destroy them in StopSyncing(). | 88 // MergeDataAndStartSyncing() and destroy them in StopSyncing(). |
| 89 std::unique_ptr<SyncChangeProcessor> sync_processor_; | 89 std::unique_ptr<SyncChangeProcessor> sync_processor_; |
| 90 std::unique_ptr<SyncErrorFactory> error_handler_; | 90 std::unique_ptr<SyncErrorFactory> error_handler_; |
| 91 | 91 |
| 92 // Cache of all syncable and local data. | 92 // Cache of all syncable and local data. |
| 93 typedef std::map<std::string, SyncData> SyncDataMap; | 93 using SyncDataMap = std::map<std::string, SyncData>; |
| 94 SyncDataMap all_data_; | 94 SyncDataMap all_data_; |
| 95 | 95 |
| 96 // Registered observers, not owned. | 96 // Registered observers, not owned. |
| 97 base::ObserverList<Observer, true> observers_; | 97 base::ObserverList<Observer, true> observers_; |
| 98 | 98 |
| 99 // Used to update our local device info once every pulse interval. | 99 // Used to update our local device info once every pulse interval. |
| 100 base::OneShotTimer pulse_timer_; | 100 base::OneShotTimer pulse_timer_; |
| 101 | 101 |
| 102 DISALLOW_COPY_AND_ASSIGN(DeviceInfoSyncService); | 102 DISALLOW_COPY_AND_ASSIGN(DeviceInfoSyncService); |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 } // namespace syncer | 105 } // namespace syncer |
| 106 | 106 |
| 107 #endif // COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_SYNC_SERVICE_H_ | 107 #endif // COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_SYNC_SERVICE_H_ |
| OLD | NEW |