Index: sync/test/fake_server/unique_client_entity.cc |
diff --git a/sync/test/fake_server/unique_client_entity.cc b/sync/test/fake_server/unique_client_entity.cc |
index 11b37d585b657f46bd41e5ad3934e9bae19eae29..3170cc1a511f7aa9c9bef2b9b74dc0cf8de62086 100644 |
--- a/sync/test/fake_server/unique_client_entity.cc |
+++ b/sync/test/fake_server/unique_client_entity.cc |
@@ -68,19 +68,16 @@ string UniqueClientEntity::GetParentId() const { |
return FakeServerEntity::GetTopLevelId(model_type_); |
} |
-sync_pb::SyncEntity* UniqueClientEntity::SerializeAsProto() { |
- sync_pb::SyncEntity* sync_entity = new sync_pb::SyncEntity(); |
- FakeServerEntity::SerializeBaseProtoFields(sync_entity); |
+void UniqueClientEntity::SerializeAsProto(sync_pb::SyncEntity* proto) { |
+ FakeServerEntity::SerializeBaseProtoFields(proto); |
- sync_pb::EntitySpecifics* specifics = sync_entity->mutable_specifics(); |
+ sync_pb::EntitySpecifics* specifics = proto->mutable_specifics(); |
specifics->CopyFrom(specifics_); |
- sync_entity->set_parent_id_string(GetParentId()); |
- sync_entity->set_client_defined_unique_tag(client_defined_unique_tag_); |
- sync_entity->set_ctime(creation_time_); |
- sync_entity->set_mtime(last_modified_time_); |
- |
- return sync_entity; |
+ proto->set_parent_id_string(GetParentId()); |
+ proto->set_client_defined_unique_tag(client_defined_unique_tag_); |
+ proto->set_ctime(creation_time_); |
+ proto->set_mtime(last_modified_time_); |
} |
bool UniqueClientEntity::IsDeleted() const { |