Index: sync/engine/entity_tracker.cc |
diff --git a/sync/engine/entity_tracker.cc b/sync/engine/entity_tracker.cc |
index bad76f9932575f43300e7ea74cea38e9e3d4b6df..ff22c54f09da04caec73cc2d288ad017bfc8c6db 100644 |
--- a/sync/engine/entity_tracker.cc |
+++ b/sync/engine/entity_tracker.cc |
@@ -12,14 +12,15 @@ |
namespace syncer { |
-EntityTracker* EntityTracker::FromServerUpdate( |
+scoped_ptr<EntityTracker> EntityTracker::FromServerUpdate( |
const std::string& id_string, |
const std::string& client_tag_hash, |
int64 received_version) { |
- return new EntityTracker(id_string, client_tag_hash, 0, received_version); |
+ return make_scoped_ptr( |
+ new EntityTracker(id_string, client_tag_hash, 0, received_version)); |
} |
-EntityTracker* EntityTracker::FromCommitRequest( |
+scoped_ptr<EntityTracker> EntityTracker::FromCommitRequest( |
const std::string& id_string, |
const std::string& client_tag_hash, |
int64 sequence_number, |
@@ -29,18 +30,9 @@ EntityTracker* EntityTracker::FromCommitRequest( |
const std::string& non_unique_name, |
bool deleted, |
const sync_pb::EntitySpecifics& specifics) { |
- return new EntityTracker(id_string, |
- client_tag_hash, |
- 0, |
- 0, |
- true, |
- sequence_number, |
- base_version, |
- ctime, |
- mtime, |
- non_unique_name, |
- deleted, |
- specifics); |
+ return make_scoped_ptr(new EntityTracker( |
+ id_string, client_tag_hash, 0, 0, true, sequence_number, base_version, |
+ ctime, mtime, non_unique_name, deleted, specifics)); |
} |
// Constructor that does not set any pending commit fields. |