Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(359)

Unified Diff: components/sync/device_info/device_info_service.cc

Issue 2388163002: [Sync] Move //components/sync to the syncer namespace, take 2. (Closed)
Patch Set: Rebase. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/sync/device_info/device_info_service.cc
diff --git a/components/sync/device_info/device_info_service.cc b/components/sync/device_info/device_info_service.cc
index 0f34b6643fe7ffbe38d89a3b9e3ed6ccbd58770b..445039b465c71ddb4dd407395d1966114f081565 100644
--- a/components/sync/device_info/device_info_service.cc
+++ b/components/sync/device_info/device_info_service.cc
@@ -20,22 +20,10 @@
#include "components/sync/protocol/data_type_state.pb.h"
#include "components/sync/protocol/sync.pb.h"
-namespace sync_driver_v2 {
+namespace syncer {
using base::Time;
using base::TimeDelta;
-using syncer::SyncError;
-using syncer_v2::DataBatchImpl;
-using syncer_v2::EntityChange;
-using syncer_v2::EntityChangeList;
-using syncer_v2::EntityData;
-using syncer_v2::EntityDataMap;
-using syncer_v2::MetadataBatch;
-using syncer_v2::MetadataChangeList;
-using syncer_v2::ModelTypeStore;
-using syncer_v2::SimpleMetadataChangeList;
-using sync_driver::DeviceInfo;
-using sync_driver::DeviceInfoUtil;
using sync_pb::DataTypeState;
using sync_pb::DeviceInfoSpecifics;
using sync_pb::EntitySpecifics;
@@ -46,10 +34,10 @@ using Result = ModelTypeStore::Result;
using WriteBatch = ModelTypeStore::WriteBatch;
DeviceInfoService::DeviceInfoService(
- sync_driver::LocalDeviceInfoProvider* local_device_info_provider,
+ LocalDeviceInfoProvider* local_device_info_provider,
const StoreFactoryFunction& callback,
const ChangeProcessorFactory& change_processor_factory)
- : ModelTypeService(change_processor_factory, syncer::DEVICE_INFO),
+ : ModelTypeService(change_processor_factory, DEVICE_INFO),
local_device_info_provider_(local_device_info_provider) {
DCHECK(local_device_info_provider);
@@ -108,7 +96,7 @@ SyncError DeviceInfoService::MergeSyncData(
// This device is valid right now and this entry is about to be
// committed, use this as an opportunity to refresh the timestamp.
all_data_[local_guid]->set_last_updated_timestamp(
- syncer::TimeToProtoTime(Time::Now()));
+ TimeToProtoTime(Time::Now()));
}
} else {
// Remote data wins conflicts.
@@ -194,8 +182,7 @@ std::string DeviceInfoService::GetClientTag(const EntityData& entity_data) {
return DeviceInfoUtil::SpecificsToTag(entity_data.specifics.device_info());
}
-std::string DeviceInfoService::GetStorageKey(
- const syncer_v2::EntityData& entity_data) {
+std::string DeviceInfoService::GetStorageKey(const EntityData& entity_data) {
DCHECK(entity_data.specifics.has_device_info());
return entity_data.specifics.device_info().cache_guid();
}
@@ -473,7 +460,7 @@ void DeviceInfoService::SendLocalData() {
std::unique_ptr<DeviceInfoSpecifics> specifics =
CopyToSpecifics(*local_device_info_provider_->GetLocalDeviceInfo());
- specifics->set_last_updated_timestamp(syncer::TimeToProtoTime(Time::Now()));
+ specifics->set_last_updated_timestamp(TimeToProtoTime(Time::Now()));
std::unique_ptr<MetadataChangeList> metadata_change_list =
CreateMetadataChangeList();
@@ -527,10 +514,10 @@ void DeviceInfoService::ReportStartupErrorToSync(const std::string& msg) {
Time DeviceInfoService::GetLastUpdateTime(
const DeviceInfoSpecifics& specifics) {
if (specifics.has_last_updated_timestamp()) {
- return syncer::ProtoTimeToTime(specifics.last_updated_timestamp());
+ return ProtoTimeToTime(specifics.last_updated_timestamp());
} else {
return Time();
}
}
-} // namespace sync_driver_v2
+} // namespace syncer
« no previous file with comments | « components/sync/device_info/device_info_service.h ('k') | components/sync/device_info/device_info_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698