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

Unified Diff: sync/internal_api/processor_entity_tracker.cc

Issue 1866243002: Convert //sync from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
Index: sync/internal_api/processor_entity_tracker.cc
diff --git a/sync/internal_api/processor_entity_tracker.cc b/sync/internal_api/processor_entity_tracker.cc
index 56b35624e788877372924b9c4f52437921615121..11b770a9727a6a192b4fcfa6cbf342b025f1b796 100644
--- a/sync/internal_api/processor_entity_tracker.cc
+++ b/sync/internal_api/processor_entity_tracker.cc
@@ -24,7 +24,7 @@ void HashSpecifics(const sync_pb::EntitySpecifics& specifics,
} // namespace
-scoped_ptr<ProcessorEntityTracker> ProcessorEntityTracker::CreateNew(
+std::unique_ptr<ProcessorEntityTracker> ProcessorEntityTracker::CreateNew(
const std::string& client_tag,
const std::string& client_tag_hash,
const std::string& id,
@@ -39,14 +39,14 @@ scoped_ptr<ProcessorEntityTracker> ProcessorEntityTracker::CreateNew(
metadata.set_server_version(kUncommittedVersion);
metadata.set_creation_time(syncer::TimeToProtoTime(creation_time));
- return scoped_ptr<ProcessorEntityTracker>(
+ return std::unique_ptr<ProcessorEntityTracker>(
new ProcessorEntityTracker(client_tag, &metadata));
}
-scoped_ptr<ProcessorEntityTracker> ProcessorEntityTracker::CreateFromMetadata(
- const std::string& client_tag,
- sync_pb::EntityMetadata* metadata) {
- return scoped_ptr<ProcessorEntityTracker>(
+std::unique_ptr<ProcessorEntityTracker>
+ProcessorEntityTracker::CreateFromMetadata(const std::string& client_tag,
+ sync_pb::EntityMetadata* metadata) {
+ return std::unique_ptr<ProcessorEntityTracker>(
new ProcessorEntityTracker(client_tag, metadata));
}
@@ -139,7 +139,7 @@ void ProcessorEntityTracker::RecordForcedUpdate(
RecordAcceptedUpdate(update);
}
-void ProcessorEntityTracker::MakeLocalChange(scoped_ptr<EntityData> data) {
+void ProcessorEntityTracker::MakeLocalChange(std::unique_ptr<EntityData> data) {
DCHECK(!metadata_.client_tag_hash().empty());
DCHECK_EQ(metadata_.client_tag_hash(), data->client_tag_hash);

Powered by Google App Engine
This is Rietveld 408576698