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

Unified Diff: sync/api/conflict_resolution.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/api/conflict_resolution.cc
diff --git a/sync/api/conflict_resolution.cc b/sync/api/conflict_resolution.cc
index 5ace43820e6ca1072cabd223649315caf5bcd950..eb1da2d2a7e50638b0eb46d1ef78e0289e24b104 100644
--- a/sync/api/conflict_resolution.cc
+++ b/sync/api/conflict_resolution.cc
@@ -17,7 +17,8 @@ ConflictResolution ConflictResolution::UseRemote() {
}
// static
-ConflictResolution ConflictResolution::UseNew(scoped_ptr<EntityData> data) {
+ConflictResolution ConflictResolution::UseNew(
+ std::unique_ptr<EntityData> data) {
DCHECK(data);
return ConflictResolution(USE_NEW, std::move(data));
}
@@ -27,13 +28,14 @@ ConflictResolution::ConflictResolution(ConflictResolution&& other)
ConflictResolution::~ConflictResolution() {}
-scoped_ptr<EntityData> ConflictResolution::ExtractData() {
+std::unique_ptr<EntityData> ConflictResolution::ExtractData() {
// Has data if and only if type is USE_NEW.
DCHECK((type_ == USE_NEW) == !!data_);
return std::move(data_);
};
-ConflictResolution::ConflictResolution(Type type, scoped_ptr<EntityData> data)
+ConflictResolution::ConflictResolution(Type type,
+ std::unique_ptr<EntityData> data)
: type_(type), data_(std::move(data)) {}
} // namespace syncer_v2
« no previous file with comments | « sync/api/conflict_resolution.h ('k') | sync/api/data_batch.h » ('j') | sync/api/sync_data.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698