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

Unified Diff: sync/test/fake_server/permanent_entity.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/test/fake_server/permanent_entity.cc
diff --git a/sync/test/fake_server/permanent_entity.cc b/sync/test/fake_server/permanent_entity.cc
index ca88c5f3cab995fbd528666e1d1c8fccf77956a5..9896c0091d11c6b75e81cf4791145d0bb04d5c10 100644
--- a/sync/test/fake_server/permanent_entity.cc
+++ b/sync/test/fake_server/permanent_entity.cc
@@ -7,6 +7,7 @@
#include <string>
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/protocol/sync.pb.h"
#include "sync/test/fake_server/fake_server_entity.h"
@@ -24,7 +25,7 @@ namespace fake_server {
PermanentEntity::~PermanentEntity() { }
// static
-scoped_ptr<FakeServerEntity> PermanentEntity::Create(
+std::unique_ptr<FakeServerEntity> PermanentEntity::Create(
const ModelType& model_type,
const string& server_tag,
const string& name,
@@ -42,12 +43,12 @@ scoped_ptr<FakeServerEntity> PermanentEntity::Create(
string parent_id = FakeServerEntity::CreateId(model_type, parent_server_tag);
sync_pb::EntitySpecifics entity_specifics;
AddDefaultFieldValue(model_type, &entity_specifics);
- return scoped_ptr<FakeServerEntity>(new PermanentEntity(
+ return std::unique_ptr<FakeServerEntity>(new PermanentEntity(
id, model_type, name, parent_id, server_tag, entity_specifics));
}
// static
-scoped_ptr<FakeServerEntity> PermanentEntity::CreateTopLevel(
+std::unique_ptr<FakeServerEntity> PermanentEntity::CreateTopLevel(
const ModelType& model_type) {
CHECK(model_type != syncer::UNSPECIFIED) << "The entity's ModelType is "
<< "invalid.";
@@ -56,19 +57,19 @@ scoped_ptr<FakeServerEntity> PermanentEntity::CreateTopLevel(
string id = FakeServerEntity::GetTopLevelId(model_type);
sync_pb::EntitySpecifics entity_specifics;
AddDefaultFieldValue(model_type, &entity_specifics);
- return scoped_ptr<FakeServerEntity>(new PermanentEntity(
+ return std::unique_ptr<FakeServerEntity>(new PermanentEntity(
id, model_type, name, kRootParentTag, server_tag, entity_specifics));
}
// static
-scoped_ptr<FakeServerEntity> PermanentEntity::CreateUpdatedNigoriEntity(
+std::unique_ptr<FakeServerEntity> PermanentEntity::CreateUpdatedNigoriEntity(
const sync_pb::SyncEntity& client_entity,
const FakeServerEntity& current_server_entity) {
ModelType model_type = current_server_entity.GetModelType();
CHECK(model_type == syncer::NIGORI) << "This factory only supports NIGORI "
<< "entities.";
- return make_scoped_ptr<FakeServerEntity>(new PermanentEntity(
+ return base::WrapUnique<FakeServerEntity>(new PermanentEntity(
current_server_entity.GetId(), model_type,
current_server_entity.GetName(), current_server_entity.GetParentId(),
syncer::ModelTypeToRootTag(model_type), client_entity.specifics()));

Powered by Google App Engine
This is Rietveld 408576698