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

Unified Diff: components/sync/api/sync_data.cc

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: 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
« no previous file with comments | « components/sync/api/sync_data.h ('k') | components/sync/api/sync_data_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/api/sync_data.cc
diff --git a/components/sync/api/sync_data.cc b/components/sync/api/sync_data.cc
index 9e6eaecb35f0ad7c91c89978386295a9064fe90e..6a959ea8c438d295629fc269db8add05e401b9cc 100644
--- a/components/sync/api/sync_data.cc
+++ b/components/sync/api/sync_data.cc
@@ -14,26 +14,29 @@
#include "components/sync/protocol/proto_value_conversions.h"
#include "components/sync/protocol/sync.pb.h"
-namespace syncer {
namespace {
-sync_pb::AttachmentIdProto IdToProto(const AttachmentId& attachment_id) {
+sync_pb::AttachmentIdProto IdToProto(
+ const syncer::AttachmentId& attachment_id) {
return attachment_id.GetProto();
}
-AttachmentId ProtoToId(const sync_pb::AttachmentIdProto& proto) {
- return AttachmentId::CreateFromProto(proto);
+syncer::AttachmentId ProtoToId(const sync_pb::AttachmentIdProto& proto) {
+ return syncer::AttachmentId::CreateFromProto(proto);
}
// Return true iff |attachment_ids| contains duplicates.
-bool ContainsDuplicateAttachments(const AttachmentIdList& attachment_ids) {
- AttachmentIdSet id_set;
+bool ContainsDuplicateAttachments(
+ const syncer::AttachmentIdList& attachment_ids) {
+ syncer::AttachmentIdSet id_set;
id_set.insert(attachment_ids.begin(), attachment_ids.end());
return id_set.size() != attachment_ids.size();
}
} // namespace
+namespace syncer {
+
void SyncData::ImmutableSyncEntityTraits::InitializeWrapper(Wrapper* wrapper) {
*wrapper = new sync_pb::SyncEntity();
}
@@ -62,7 +65,7 @@ SyncData::SyncData() : id_(kInvalidId), is_valid_(false) {}
SyncData::SyncData(int64_t id,
sync_pb::SyncEntity* entity,
const base::Time& remote_modification_time,
- const AttachmentServiceProxy& attachment_service)
+ const syncer::AttachmentServiceProxy& attachment_service)
: id_(id),
remote_modification_time_(remote_modification_time),
immutable_entity_(entity),
@@ -85,7 +88,7 @@ SyncData SyncData::CreateLocalDelete(const std::string& sync_tag,
SyncData SyncData::CreateLocalData(const std::string& sync_tag,
const std::string& non_unique_title,
const sync_pb::EntitySpecifics& specifics) {
- AttachmentIdList attachment_ids;
+ syncer::AttachmentIdList attachment_ids;
return CreateLocalDataWithAttachments(sync_tag, non_unique_title, specifics,
attachment_ids);
}
@@ -215,7 +218,7 @@ const std::string& SyncDataRemote::GetClientTagHash() const {
// the server so we wouldn't be able to set this value anyways. The only way
// to recreate an un-hashed tag is for the service to do so with a specifics.
// Should only be used by sessions, see crbug.com/604657.
- DCHECK_EQ(SESSIONS, GetDataType());
+ DCHECK_EQ(syncer::SESSIONS, GetDataType());
return immutable_entity_.Get().client_defined_unique_tag();
}
« no previous file with comments | « components/sync/api/sync_data.h ('k') | components/sync/api/sync_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698