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

Unified Diff: components/sync/driver/glue/sync_backend_registrar_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/glue/sync_backend_registrar_unittest.cc
diff --git a/components/sync/driver/glue/sync_backend_registrar_unittest.cc b/components/sync/driver/glue/sync_backend_registrar_unittest.cc
index 07ab13ebd73ae61702e2acbe10543caf8c0ba684..2cbba5a95624b35eab0cb9ed95a3d15a76f28723 100644
--- a/components/sync/driver/glue/sync_backend_registrar_unittest.cc
+++ b/components/sync/driver/glue/sync_backend_registrar_unittest.cc
@@ -5,6 +5,7 @@
#include "components/sync/driver/glue/sync_backend_registrar.h"
#include "base/location.h"
+#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "components/sync/driver/change_processor_mock.h"
@@ -88,11 +89,11 @@ class SyncBackendRegistrarTest : public testing::Test {
db_thread_.StartAndWaitForTesting();
file_thread_.StartAndWaitForTesting();
test_user_share_.SetUp();
- sync_client_.reset(new RegistrarSyncClient(
- ui_task_runner(), db_task_runner(), file_task_runner()));
- registrar_.reset(new SyncBackendRegistrar(
+ sync_client_ = base::MakeUnique<RegistrarSyncClient>(
+ ui_task_runner(), db_task_runner(), file_task_runner());
+ registrar_ = base::MakeUnique<SyncBackendRegistrar>(
"test", sync_client_.get(), std::unique_ptr<base::Thread>(),
- ui_task_runner(), db_task_runner(), file_task_runner()));
+ ui_task_runner(), db_task_runner(), file_task_runner());
sync_thread_ = registrar_->sync_thread();
}
@@ -328,8 +329,8 @@ class SyncBackendRegistrarShutdownTest : public testing::Test {
void SetUp() override {
db_thread_.StartAndWaitForTesting();
file_thread_.StartAndWaitForTesting();
- sync_client_.reset(new RegistrarSyncClient(
- ui_task_runner(), db_task_runner(), file_task_runner()));
+ sync_client_ = base::MakeUnique<RegistrarSyncClient>(
+ ui_task_runner(), db_task_runner(), file_task_runner());
}
void PostQuitOnUIMessageLoop() {
« no previous file with comments | « components/sync/driver/glue/sync_backend_registrar.cc ('k') | components/sync/driver/model_type_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698