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

Unified Diff: device/bluetooth/dbus/bluetooth_gatt_application_service_provider.cc

Issue 2254833003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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: device/bluetooth/dbus/bluetooth_gatt_application_service_provider.cc
diff --git a/device/bluetooth/dbus/bluetooth_gatt_application_service_provider.cc b/device/bluetooth/dbus/bluetooth_gatt_application_service_provider.cc
index c32c0ad7e6fe87a0e63dab68153b41858fa13024..5d436b844aa9fc672b7dda2f5e3e08749d7f6b31 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_application_service_provider.cc
+++ b/device/bluetooth/dbus/bluetooth_gatt_application_service_provider.cc
@@ -116,8 +116,8 @@ void BluetoothGattApplicationServiceProvider::CreateAttributeServiceProviders(
characteristic_providers_.push_back(
base::WrapUnique(BluetoothGattCharacteristicServiceProvider::Create(
bus, characteristic.second->object_path(),
- base::WrapUnique(new BluetoothGattCharacteristicDelegateWrapper(
- service.second, characteristic.second.get())),
+ base::MakeUnique<BluetoothGattCharacteristicDelegateWrapper>(
+ service.second, characteristic.second.get()),
characteristic.second->GetUUID().value(),
FlagsFromProperties(characteristic.second->GetProperties()),
service.second->object_path())));
@@ -125,8 +125,8 @@ void BluetoothGattApplicationServiceProvider::CreateAttributeServiceProviders(
descriptor_providers_.push_back(
base::WrapUnique(BluetoothGattDescriptorServiceProvider::Create(
bus, descriptor->object_path(),
- base::WrapUnique(new BluetoothGattDescriptorDelegateWrapper(
- service.second, descriptor.get())),
+ base::MakeUnique<BluetoothGattDescriptorDelegateWrapper>(
+ service.second, descriptor.get()),
descriptor->GetUUID().value(),
FlagsFromPermissions(descriptor->GetPermissions()),
characteristic.second->object_path())));
@@ -161,8 +161,8 @@ BluetoothGattApplicationServiceProvider::Create(
return base::WrapUnique(new BluetoothGattApplicationServiceProviderImpl(
bus, object_path, services));
}
- return base::WrapUnique(
- new FakeBluetoothGattApplicationServiceProvider(object_path, services));
+ return base::MakeUnique<FakeBluetoothGattApplicationServiceProvider>(
+ object_path, services);
}
} // namespace bluez

Powered by Google App Engine
This is Rietveld 408576698