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

Unified Diff: sync/engine/entity_tracker.cc

Issue 1096983002: Update usages of std::map to use ScopedPtrMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@passwordmanager-scopedmemory
Patch Set: Rebase. Created 5 years, 6 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/engine/entity_tracker.h ('k') | sync/engine/model_type_sync_proxy_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « sync/engine/entity_tracker.h ('k') | sync/engine/model_type_sync_proxy_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698