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

Unified Diff: components/sync/driver/startup_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/startup_controller_unittest.cc
diff --git a/components/sync/driver/startup_controller_unittest.cc b/components/sync/driver/startup_controller_unittest.cc
index 7be62c766439e86ed8b038db708a4222c88a8790..4ecc67e0c1caf5ab3b98d0743388d01095986cd2 100644
--- a/components/sync/driver/startup_controller_unittest.cc
+++ b/components/sync/driver/startup_controller_unittest.cc
@@ -7,6 +7,7 @@
#include <memory>
#include "base/command_line.h"
+#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "components/sync/base/sync_prefs.h"
@@ -30,12 +31,12 @@ class StartupControllerTest : public testing::Test {
void SetUp() override {
SyncPrefs::RegisterProfilePrefs(pref_service_.registry());
- sync_prefs_.reset(new SyncPrefs(&pref_service_));
- controller_.reset(new StartupController(
+ sync_prefs_ = base::MakeUnique<SyncPrefs>(&pref_service_);
+ controller_ = base::MakeUnique<StartupController>(
sync_prefs_.get(),
base::Bind(&StartupControllerTest::CanStart, base::Unretained(this)),
base::Bind(&StartupControllerTest::FakeStartBackend,
- base::Unretained(this))));
+ base::Unretained(this)));
controller_->Reset(UserTypes());
controller_->OverrideFallbackTimeoutForTest(
base::TimeDelta::FromSeconds(0));

Powered by Google App Engine
This is Rietveld 408576698