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

Unified Diff: components/sync/driver/model_type_controller_unittest.cc

Issue 2422253002: [Sync] Rewriting ".reset(new" pattern to use "= base::MakeUnique" instead. (Closed)
Patch Set: Fixing compile. Created 4 years, 2 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: components/sync/driver/model_type_controller_unittest.cc
diff --git a/components/sync/driver/model_type_controller_unittest.cc b/components/sync/driver/model_type_controller_unittest.cc
index 603344dcdee8feba78ea85f96cc4a8de51696012..4705bd09d1369df662d52749dada9d96fefc87c4 100644
--- a/components/sync/driver/model_type_controller_unittest.cc
+++ b/components/sync/driver/model_type_controller_unittest.cc
@@ -125,8 +125,8 @@ class ModelTypeControllerTest : public testing::Test, public FakeSyncClient {
void SetUp() override {
model_thread_.Start();
InitializeModelTypeService();
- controller_.reset(new ModelTypeController(
- kTestModelType, base::Closure(), this, model_thread_.task_runner()));
+ controller_ = base::MakeUnique<ModelTypeController>(
+ kTestModelType, base::Closure(), this, model_thread_.task_runner());
}
void TearDown() override {
@@ -220,8 +220,8 @@ class ModelTypeControllerTest : public testing::Test, public FakeSyncClient {
void InitializeModelTypeService() {
if (model_thread_.task_runner()->BelongsToCurrentThread()) {
- service_.reset(new StubModelTypeService(base::Bind(
- &ModelTypeControllerTest::CreateProcessor, base::Unretained(this))));
+ service_ = base::MakeUnique<StubModelTypeService>(base::Bind(
+ &ModelTypeControllerTest::CreateProcessor, base::Unretained(this)));
} else {
model_thread_.task_runner()->PostTask(
FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698