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

Unified Diff: sync/test/fake_server/tombstone_entity.cc

Issue 600083003: Fix memory leak in Sync FakeServerEntity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 6 years, 3 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 | « sync/test/fake_server/tombstone_entity.h ('k') | sync/test/fake_server/unique_client_entity.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/test/fake_server/tombstone_entity.cc
diff --git a/sync/test/fake_server/tombstone_entity.cc b/sync/test/fake_server/tombstone_entity.cc
index e68deb3ebb9b12b8547b5af753f0b7565e3c9472..801690fe719583013c75a5da607a5f71ad8ae003 100644
--- a/sync/test/fake_server/tombstone_entity.cc
+++ b/sync/test/fake_server/tombstone_entity.cc
@@ -32,14 +32,11 @@ string TombstoneEntity::GetParentId() const {
return string();
}
-sync_pb::SyncEntity* TombstoneEntity::SerializeAsProto() {
- sync_pb::SyncEntity* sync_entity = new sync_pb::SyncEntity();
- FakeServerEntity::SerializeBaseProtoFields(sync_entity);
+void TombstoneEntity::SerializeAsProto(sync_pb::SyncEntity* proto) {
+ FakeServerEntity::SerializeBaseProtoFields(proto);
- sync_pb::EntitySpecifics* specifics = sync_entity->mutable_specifics();
+ sync_pb::EntitySpecifics* specifics = proto->mutable_specifics();
AddDefaultFieldValue(FakeServerEntity::GetModelType(), specifics);
-
- return sync_entity;
}
bool TombstoneEntity::IsDeleted() const {
« no previous file with comments | « sync/test/fake_server/tombstone_entity.h ('k') | sync/test/fake_server/unique_client_entity.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698