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

Unified Diff: components/proximity_auth/remote_device_life_cycle_impl.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/remote_device_life_cycle_impl.cc
diff --git a/components/proximity_auth/remote_device_life_cycle_impl.cc b/components/proximity_auth/remote_device_life_cycle_impl.cc
index ad5de7c037f64f6c3f58b33744669486b71b0f41..a5c37bea93255687500771fbd07643f6e4aaf8b8 100644
--- a/components/proximity_auth/remote_device_life_cycle_impl.cc
+++ b/components/proximity_auth/remote_device_life_cycle_impl.cc
@@ -83,22 +83,22 @@ void RemoteDeviceLifeCycleImpl::RemoveObserver(Observer* observer) {
std::unique_ptr<ConnectionFinder>
RemoteDeviceLifeCycleImpl::CreateConnectionFinder() {
if (remote_device_.bluetooth_type == RemoteDevice::BLUETOOTH_LE) {
- return base::WrapUnique(new BluetoothLowEnergyConnectionFinder(
+ return base::MakeUnique<BluetoothLowEnergyConnectionFinder>(
remote_device_, kBLESmartLockServiceUUID,
BluetoothLowEnergyConnectionFinder::FinderStrategy::FIND_PAIRED_DEVICE,
- nullptr, bluetooth_throttler_.get(), 3));
+ nullptr, bluetooth_throttler_.get(), 3);
} else {
- return base::WrapUnique(new BluetoothConnectionFinder(
+ return base::MakeUnique<BluetoothConnectionFinder>(
remote_device_, device::BluetoothUUID(kClassicBluetoothServiceUUID),
- base::TimeDelta::FromSeconds(3)));
+ base::TimeDelta::FromSeconds(3));
}
}
std::unique_ptr<Authenticator>
RemoteDeviceLifeCycleImpl::CreateAuthenticator() {
- return base::WrapUnique(new DeviceToDeviceAuthenticator(
+ return base::MakeUnique<DeviceToDeviceAuthenticator>(
connection_.get(), remote_device_.user_id,
- proximity_auth_client_->CreateSecureMessageDelegate()));
+ proximity_auth_client_->CreateSecureMessageDelegate());
}
void RemoteDeviceLifeCycleImpl::TransitionToState(

Powered by Google App Engine
This is Rietveld 408576698