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

Unified Diff: components/proximity_auth/cryptauth/cryptauth_enrollment_manager_unittest.cc

Issue 2250023005: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/proximity_auth/cryptauth/cryptauth_enrollment_manager_unittest.cc
diff --git a/components/proximity_auth/cryptauth/cryptauth_enrollment_manager_unittest.cc b/components/proximity_auth/cryptauth/cryptauth_enrollment_manager_unittest.cc
index 4a94e75117194c14cea1ac514b512bb6500cef48..915d7257ea1edf929da12f6f5bbf6691b251c212 100644
--- a/components/proximity_auth/cryptauth/cryptauth_enrollment_manager_unittest.cc
+++ b/components/proximity_auth/cryptauth/cryptauth_enrollment_manager_unittest.cc
@@ -221,8 +221,8 @@ class ProximityAuthCryptAuthEnrollmentManagerTest
Enroll(public_key_, private_key_, _, expected_invocation_reason, _))
.WillOnce(SaveArg<4>(&completion_callback));
- auto sync_request = base::WrapUnique(
- new SyncScheduler::SyncRequest(enrollment_manager_.GetSyncScheduler()));
+ auto sync_request = base::MakeUnique<SyncScheduler::SyncRequest>(
+ enrollment_manager_.GetSyncScheduler());
EXPECT_CALL(*this, OnEnrollmentStartedProxy());
SyncScheduler::Delegate* delegate =
@@ -308,8 +308,8 @@ TEST_F(ProximityAuthCryptAuthEnrollmentManagerTest, InitWithDefaultPrefs) {
CryptAuthEnrollmentManager::RegisterPrefs(pref_service.registry());
TestCryptAuthEnrollmentManager enrollment_manager(
- std::move(clock), base::WrapUnique(new MockCryptAuthEnrollerFactory()),
- base::WrapUnique(new FakeSecureMessageDelegate()), device_info_,
+ std::move(clock), base::MakeUnique<MockCryptAuthEnrollerFactory>(),
+ base::MakeUnique<FakeSecureMessageDelegate>(), device_info_,
&gcm_manager_, &pref_service);
EXPECT_CALL(
@@ -409,8 +409,8 @@ TEST_F(ProximityAuthCryptAuthEnrollmentManagerTest,
// Trigger a sync request.
EXPECT_CALL(*this, OnEnrollmentStartedProxy());
- auto sync_request = base::WrapUnique(
- new SyncScheduler::SyncRequest(enrollment_manager_.GetSyncScheduler()));
+ auto sync_request = base::MakeUnique<SyncScheduler::SyncRequest>(
+ enrollment_manager_.GetSyncScheduler());
static_cast<SyncScheduler::Delegate*>(&enrollment_manager_)
->OnSyncRequested(std::move(sync_request));
@@ -445,8 +445,8 @@ TEST_F(ProximityAuthCryptAuthEnrollmentManagerTest, GCMRegistrationFails) {
// Trigger a sync request.
EXPECT_CALL(*this, OnEnrollmentStartedProxy());
- auto sync_request = base::WrapUnique(
- new SyncScheduler::SyncRequest(enrollment_manager_.GetSyncScheduler()));
+ auto sync_request = base::MakeUnique<SyncScheduler::SyncRequest>(
+ enrollment_manager_.GetSyncScheduler());
static_cast<SyncScheduler::Delegate*>(&enrollment_manager_)
->OnSyncRequested(std::move(sync_request));

Powered by Google App Engine
This is Rietveld 408576698