| Index: components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc
|
| diff --git a/components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc b/components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc
|
| index 90fbf5f894fec1484967189f004e03f05ad53c65..803ed5911cc5d26232562203b9a8be89db329138 100644
|
| --- a/components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc
|
| +++ b/components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "components/proximity_auth/ble/bluetooth_low_energy_connection_finder.h"
|
|
|
| +#include <memory>
|
| #include <string>
|
| #include <utility>
|
|
|
| @@ -11,7 +12,7 @@
|
| #include "base/bind_helpers.h"
|
| #include "base/location.h"
|
| #include "base/logging.h"
|
| -#include "base/memory/scoped_ptr.h"
|
| +#include "base/memory/ptr_util.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "base/thread_task_runner_handle.h"
|
| #include "components/proximity_auth/ble/bluetooth_low_energy_connection.h"
|
| @@ -209,7 +210,7 @@ void BluetoothLowEnergyConnectionFinder::OnAdapterInitialized(
|
| }
|
|
|
| void BluetoothLowEnergyConnectionFinder::OnDiscoverySessionStarted(
|
| - scoped_ptr<device::BluetoothDiscoverySession> discovery_session) {
|
| + std::unique_ptr<device::BluetoothDiscoverySession> discovery_session) {
|
| PA_LOG(INFO) << "Discovery session started";
|
| discovery_session_ = std::move(discovery_session);
|
| }
|
| @@ -226,7 +227,7 @@ void BluetoothLowEnergyConnectionFinder::StartDiscoverySession() {
|
| }
|
|
|
| // Discover only low energy (LE) devices with strong enough signal.
|
| - scoped_ptr<BluetoothDiscoveryFilter> filter(new BluetoothDiscoveryFilter(
|
| + std::unique_ptr<BluetoothDiscoveryFilter> filter(new BluetoothDiscoveryFilter(
|
| BluetoothDiscoveryFilter::Transport::TRANSPORT_LE));
|
| filter->SetRSSI(kMinDiscoveryRSSI);
|
|
|
| @@ -245,12 +246,13 @@ void BluetoothLowEnergyConnectionFinder::StopDiscoverySession() {
|
| discovery_session_.reset();
|
| }
|
|
|
| -scoped_ptr<Connection> BluetoothLowEnergyConnectionFinder::CreateConnection(
|
| +std::unique_ptr<Connection>
|
| +BluetoothLowEnergyConnectionFinder::CreateConnection(
|
| const std::string& device_address) {
|
| DCHECK(remote_device_.bluetooth_address.empty() ||
|
| remote_device_.bluetooth_address == device_address);
|
| remote_device_.bluetooth_address = device_address;
|
| - return make_scoped_ptr(new BluetoothLowEnergyConnection(
|
| + return base::WrapUnique(new BluetoothLowEnergyConnection(
|
| remote_device_, adapter_, remote_service_uuid_, bluetooth_throttler_,
|
| max_number_of_tries_));
|
| }
|
|
|