Index: components/proximity_auth/ble/bluetooth_low_energy_characteristics_finder_unittest.cc |
diff --git a/components/proximity_auth/ble/bluetooth_low_energy_characteristics_finder_unittest.cc b/components/proximity_auth/ble/bluetooth_low_energy_characteristics_finder_unittest.cc |
index 934393b14cc854532a28918844dc125e6144a009..1cbe48b923b6780ff0e16d3704f43f3a0328457d 100644 |
--- a/components/proximity_auth/ble/bluetooth_low_energy_characteristics_finder_unittest.cc |
+++ b/components/proximity_auth/ble/bluetooth_low_energy_characteristics_finder_unittest.cc |
@@ -4,9 +4,10 @@ |
#include "components/proximity_auth/ble/bluetooth_low_energy_characteristics_finder.h" |
+#include <memory> |
+ |
#include "base/bind.h" |
#include "base/memory/ref_counted.h" |
-#include "base/memory/scoped_ptr.h" |
#include "components/proximity_auth/ble/remote_attribute.h" |
#include "device/bluetooth/bluetooth_adapter_factory.h" |
#include "device/bluetooth/bluetooth_uuid.h" |
@@ -97,11 +98,11 @@ class ProximityAuthBluetoothLowEnergyCharacteristicFinderTest |
MOCK_METHOD2(OnCharacteristicsFinderError, |
void(const RemoteAttribute&, const RemoteAttribute&)); |
- scoped_ptr<device::MockBluetoothGattCharacteristic> |
+ std::unique_ptr<device::MockBluetoothGattCharacteristic> |
ExpectToFindCharacteristic(const device::BluetoothUUID& uuid, |
const std::string& id, |
bool valid) { |
- scoped_ptr<device::MockBluetoothGattCharacteristic> characteristic( |
+ std::unique_ptr<device::MockBluetoothGattCharacteristic> characteristic( |
new NiceMock<device::MockBluetoothGattCharacteristic>( |
service_.get(), id, uuid, true, kCharacteristicProperties, |
device::BluetoothGattCharacteristic::PERMISSION_NONE)); |
@@ -117,8 +118,8 @@ class ProximityAuthBluetoothLowEnergyCharacteristicFinderTest |
scoped_refptr<device::MockBluetoothAdapter> adapter_; |
BluetoothLowEnergyCharacteristicsFinder::SuccessCallback success_callback_; |
BluetoothLowEnergyCharacteristicsFinder::ErrorCallback error_callback_; |
- scoped_ptr<device::MockBluetoothDevice> device_; |
- scoped_ptr<device::MockBluetoothGattService> service_; |
+ std::unique_ptr<device::MockBluetoothDevice> device_; |
+ std::unique_ptr<device::MockBluetoothGattService> service_; |
RemoteAttribute remote_service_; |
RemoteAttribute to_peripheral_char_; |
RemoteAttribute from_peripheral_char_; |
@@ -148,12 +149,12 @@ TEST_F(ProximityAuthBluetoothLowEnergyCharacteristicFinderTest, |
DoAll(SaveArg<1>(&found_to_char), SaveArg<2>(&found_from_char))); |
EXPECT_CALL(*this, OnCharacteristicsFinderError(_, _)).Times(0); |
- scoped_ptr<device::MockBluetoothGattCharacteristic> from_char = |
+ std::unique_ptr<device::MockBluetoothGattCharacteristic> from_char = |
ExpectToFindCharacteristic(device::BluetoothUUID(kFromPeripheralCharUUID), |
kFromPeripheralCharID, true); |
observer->GattCharacteristicAdded(adapter_.get(), from_char.get()); |
- scoped_ptr<device::MockBluetoothGattCharacteristic> to_char = |
+ std::unique_ptr<device::MockBluetoothGattCharacteristic> to_char = |
ExpectToFindCharacteristic(device::BluetoothUUID(kToPeripheralCharUUID), |
kToPeripheralCharID, true); |
observer->GattCharacteristicAdded(adapter_.get(), to_char.get()); |
@@ -177,7 +178,7 @@ TEST_F(ProximityAuthBluetoothLowEnergyCharacteristicFinderTest, |
EXPECT_CALL(*this, OnCharacteristicsFound(_, _, _)).Times(0); |
EXPECT_CALL(*this, OnCharacteristicsFinderError(_, _)); |
- scoped_ptr<device::MockBluetoothGattCharacteristic> other_char = |
+ std::unique_ptr<device::MockBluetoothGattCharacteristic> other_char = |
ExpectToFindCharacteristic(device::BluetoothUUID(kOtherCharUUID), |
kOtherCharID, false); |
observer->GattCharacteristicAdded(adapter_.get(), other_char.get()); |
@@ -201,7 +202,7 @@ TEST_F(ProximityAuthBluetoothLowEnergyCharacteristicFinderTest, |
.WillOnce( |
DoAll(SaveArg<0>(&found_to_char), SaveArg<1>(&found_from_char))); |
- scoped_ptr<device::MockBluetoothGattCharacteristic> from_char = |
+ std::unique_ptr<device::MockBluetoothGattCharacteristic> from_char = |
ExpectToFindCharacteristic(device::BluetoothUUID(kFromPeripheralCharUUID), |
kFromPeripheralCharID, true); |
observer->GattCharacteristicAdded(adapter_.get(), from_char.get()); |
@@ -226,17 +227,17 @@ TEST_F(ProximityAuthBluetoothLowEnergyCharacteristicFinderTest, |
DoAll(SaveArg<1>(&found_to_char), SaveArg<2>(&found_from_char))); |
EXPECT_CALL(*this, OnCharacteristicsFinderError(_, _)).Times(0); |
- scoped_ptr<device::MockBluetoothGattCharacteristic> other_char = |
+ std::unique_ptr<device::MockBluetoothGattCharacteristic> other_char = |
ExpectToFindCharacteristic(device::BluetoothUUID(kOtherCharUUID), |
kOtherCharID, false); |
observer->GattCharacteristicAdded(adapter_.get(), other_char.get()); |
- scoped_ptr<device::MockBluetoothGattCharacteristic> from_char = |
+ std::unique_ptr<device::MockBluetoothGattCharacteristic> from_char = |
ExpectToFindCharacteristic(device::BluetoothUUID(kFromPeripheralCharUUID), |
kFromPeripheralCharID, true); |
observer->GattCharacteristicAdded(adapter_.get(), from_char.get()); |
- scoped_ptr<device::MockBluetoothGattCharacteristic> to_char = |
+ std::unique_ptr<device::MockBluetoothGattCharacteristic> to_char = |
ExpectToFindCharacteristic(device::BluetoothUUID(kToPeripheralCharUUID), |
kToPeripheralCharID, true); |
observer->GattCharacteristicAdded(adapter_.get(), to_char.get()); |
@@ -257,11 +258,11 @@ TEST_F(ProximityAuthBluetoothLowEnergyCharacteristicFinderTest, |
DoAll(SaveArg<1>(&found_to_char), SaveArg<2>(&found_from_char))); |
EXPECT_CALL(*this, OnCharacteristicsFinderError(_, _)).Times(0); |
- scoped_ptr<device::MockBluetoothGattCharacteristic> from_char = |
+ std::unique_ptr<device::MockBluetoothGattCharacteristic> from_char = |
ExpectToFindCharacteristic(device::BluetoothUUID(kFromPeripheralCharUUID), |
kFromPeripheralCharID, true); |
- scoped_ptr<device::MockBluetoothGattCharacteristic> to_char = |
+ std::unique_ptr<device::MockBluetoothGattCharacteristic> to_char = |
ExpectToFindCharacteristic(device::BluetoothUUID(kToPeripheralCharUUID), |
kToPeripheralCharID, true); |