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

Unified Diff: components/sync/device_info/device_info_service_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/device_info/device_info_service_unittest.cc
diff --git a/components/sync/device_info/device_info_service_unittest.cc b/components/sync/device_info/device_info_service_unittest.cc
index 3afcb5b4540a7eb340e057479e20759d508e4f9e..83a9c8d4e55a32dd1f696f5fde7bf3a0277fe549 100644
--- a/components/sync/device_info/device_info_service_unittest.cc
+++ b/components/sync/device_info/device_info_service_unittest.cc
@@ -188,12 +188,12 @@ class DeviceInfoServiceTest : public testing::Test,
// only be called once per run, as it passes |store_|.
void InitializeService() {
ASSERT_TRUE(store_);
- service_.reset(new DeviceInfoService(
+ service_ = base::MakeUnique<DeviceInfoService>(
local_device_.get(),
base::Bind(&ModelTypeStoreTestUtil::MoveStoreToCallback,
base::Passed(&store_)),
base::Bind(&DeviceInfoServiceTest::CreateModelTypeChangeProcessor,
- base::Unretained(this))));
+ base::Unretained(this)));
service_->AddObserver(this);
}

Powered by Google App Engine
This is Rietveld 408576698