| Index: components/sync/device_info/device_info_sync_service.h
|
| diff --git a/components/sync/device_info/device_info_sync_service.h b/components/sync/device_info/device_info_sync_service.h
|
| index 951d685c4b606e9a409e9eb34413087d0a091692..72aebb2654547e35b00fd4d0347884893e0c2041 100644
|
| --- a/components/sync/device_info/device_info_sync_service.h
|
| +++ b/components/sync/device_info/device_info_sync_service.h
|
| @@ -22,27 +22,29 @@
|
| #include "components/sync/api/syncable_service.h"
|
| #include "components/sync/device_info/device_info_tracker.h"
|
|
|
| -namespace syncer {
|
| +namespace sync_driver {
|
|
|
| class LocalDeviceInfoProvider;
|
|
|
| // SyncableService implementation for DEVICE_INFO model type.
|
| -class DeviceInfoSyncService : public SyncableService, public DeviceInfoTracker {
|
| +class DeviceInfoSyncService : public syncer::SyncableService,
|
| + public DeviceInfoTracker {
|
| public:
|
| explicit DeviceInfoSyncService(
|
| LocalDeviceInfoProvider* local_device_info_provider);
|
| ~DeviceInfoSyncService() override;
|
|
|
| - // SyncableService implementation.
|
| - SyncMergeResult MergeDataAndStartSyncing(
|
| - ModelType type,
|
| - const SyncDataList& initial_sync_data,
|
| - std::unique_ptr<SyncChangeProcessor> sync_processor,
|
| - std::unique_ptr<SyncErrorFactory> error_handler) override;
|
| - void StopSyncing(ModelType type) override;
|
| - SyncDataList GetAllSyncData(ModelType type) const override;
|
| - SyncError ProcessSyncChanges(const tracked_objects::Location& from_here,
|
| - const SyncChangeList& change_list) override;
|
| + // syncer::SyncableService implementation.
|
| + syncer::SyncMergeResult MergeDataAndStartSyncing(
|
| + syncer::ModelType type,
|
| + const syncer::SyncDataList& initial_sync_data,
|
| + std::unique_ptr<syncer::SyncChangeProcessor> sync_processor,
|
| + std::unique_ptr<syncer::SyncErrorFactory> error_handler) override;
|
| + void StopSyncing(syncer::ModelType type) override;
|
| + syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override;
|
| + syncer::SyncError ProcessSyncChanges(
|
| + const tracked_objects::Location& from_here,
|
| + const syncer::SyncChangeList& change_list) override;
|
|
|
| // DeviceInfoTracker implementation.
|
| bool IsSyncing() const override;
|
| @@ -57,39 +59,41 @@ class DeviceInfoSyncService : public SyncableService, public DeviceInfoTracker {
|
| friend class DeviceInfoSyncServiceTest;
|
|
|
| // Create SyncData from local DeviceInfo.
|
| - SyncData CreateLocalData(const DeviceInfo* info);
|
| + syncer::SyncData CreateLocalData(const DeviceInfo* info);
|
| // Create SyncData from EntitySpecifics.
|
| - static SyncData CreateLocalData(const sync_pb::EntitySpecifics& entity);
|
| + static syncer::SyncData CreateLocalData(
|
| + const sync_pb::EntitySpecifics& entity);
|
|
|
| // Allocate new DeviceInfo from SyncData.
|
| - static DeviceInfo* CreateDeviceInfo(const SyncData& sync_data);
|
| + static DeviceInfo* CreateDeviceInfo(const syncer::SyncData& sync_data);
|
| // Store SyncData in the cache.
|
| - void StoreSyncData(const std::string& client_id, const SyncData& sync_data);
|
| + void StoreSyncData(const std::string& client_id,
|
| + const syncer::SyncData& sync_data);
|
| // Delete SyncData from the cache.
|
| void DeleteSyncData(const std::string& client_id);
|
| // Notify all registered observers.
|
| void NotifyObservers();
|
|
|
| // Sends a copy of the current device's state to the processor/sync.
|
| - void SendLocalData(const SyncChange::SyncChangeType change_type);
|
| + void SendLocalData(const syncer::SyncChange::SyncChangeType change_type);
|
|
|
| // Finds the number of active devices give the current time, which allows for
|
| // better unit tests.
|
| int CountActiveDevices(const base::Time now) const;
|
|
|
| // Find the timestamp for the last time this |device_info| was edited.
|
| - static base::Time GetLastUpdateTime(const SyncData& device_info);
|
| + static base::Time GetLastUpdateTime(const syncer::SyncData& device_info);
|
|
|
| // |local_device_info_provider_| isn't owned.
|
| const LocalDeviceInfoProvider* const local_device_info_provider_;
|
|
|
| // Receives ownership of |sync_processor_| and |error_handler_| in
|
| // MergeDataAndStartSyncing() and destroy them in StopSyncing().
|
| - std::unique_ptr<SyncChangeProcessor> sync_processor_;
|
| - std::unique_ptr<SyncErrorFactory> error_handler_;
|
| + std::unique_ptr<syncer::SyncChangeProcessor> sync_processor_;
|
| + std::unique_ptr<syncer::SyncErrorFactory> error_handler_;
|
|
|
| // Cache of all syncable and local data.
|
| - typedef std::map<std::string, SyncData> SyncDataMap;
|
| + typedef std::map<std::string, syncer::SyncData> SyncDataMap;
|
| SyncDataMap all_data_;
|
|
|
| // Registered observers, not owned.
|
| @@ -101,6 +105,6 @@ class DeviceInfoSyncService : public SyncableService, public DeviceInfoTracker {
|
| DISALLOW_COPY_AND_ASSIGN(DeviceInfoSyncService);
|
| };
|
|
|
| -} // namespace syncer
|
| +} // namespace sync_driver
|
|
|
| #endif // COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_SYNC_SERVICE_H_
|
|
|