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> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
17 #include "base/timer/timer.h" | 17 #include "base/timer/timer.h" |
18 #include "components/sync/device_info/device_info_tracker.h" | 18 #include "components/sync/device_info/device_info_tracker.h" |
19 #include "components/sync/device_info/local_device_info_provider.h" | 19 #include "components/sync/device_info/local_device_info_provider.h" |
20 #include "components/sync/model/model_type_store.h" | 20 #include "components/sync/model/model_type_store.h" |
21 #include "components/sync/model/model_type_sync_bridge.h" | 21 #include "components/sync/model/model_type_sync_bridge.h" |
22 | 22 |
23 namespace sync_pb { | 23 namespace sync_pb { |
24 class DeviceInfoSpecifics; | 24 class DeviceInfoSpecifics; |
25 } // namespace sync_pb | 25 } // namespace sync_pb |
26 | 26 |
27 namespace syncer { | 27 namespace syncer { |
28 | 28 |
29 class ModelTypeChangeProcessor; | |
30 class SyncError; | 29 class SyncError; |
31 | 30 |
32 // Sync bridge implementation for DEVICE_INFO model type. Handles storage of | 31 // Sync bridge implementation for DEVICE_INFO model type. Handles storage of |
33 // device info and associated sync metadata, applying/merging foreign changes, | 32 // device info and associated sync metadata, applying/merging foreign changes, |
34 // and allows public read access. | 33 // and allows public read access. |
35 class DeviceInfoSyncBridge : public ModelTypeSyncBridge, | 34 class DeviceInfoSyncBridge : public ModelTypeSyncBridge, |
36 public DeviceInfoTracker { | 35 public DeviceInfoTracker { |
37 public: | 36 public: |
38 typedef base::Callback<void(const ModelTypeStore::InitCallback& callback)> | 37 typedef base::Callback<void(const ModelTypeStore::InitCallback& callback)> |
39 StoreFactoryFunction; | 38 StoreFactoryFunction; |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 145 |
147 // Used to update our local device info once every pulse interval. | 146 // Used to update our local device info once every pulse interval. |
148 base::OneShotTimer pulse_timer_; | 147 base::OneShotTimer pulse_timer_; |
149 | 148 |
150 DISALLOW_COPY_AND_ASSIGN(DeviceInfoSyncBridge); | 149 DISALLOW_COPY_AND_ASSIGN(DeviceInfoSyncBridge); |
151 }; | 150 }; |
152 | 151 |
153 } // namespace syncer | 152 } // namespace syncer |
154 | 153 |
155 #endif // COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_SYNC_BRIDGE_H_ | 154 #endif // COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_SYNC_BRIDGE_H_ |
OLD | NEW |