| Index: components/proximity_auth/ble/bluetooth_low_energy_connection.cc
|
| diff --git a/components/proximity_auth/ble/bluetooth_low_energy_connection.cc b/components/proximity_auth/ble/bluetooth_low_energy_connection.cc
|
| index 52af29b32bf4fc1c35bb2133c6c32e93eb149a23..839e442d2bbf53276c7bfc21c67ab84a2b90a602 100644
|
| --- a/components/proximity_auth/ble/bluetooth_low_energy_connection.cc
|
| +++ b/components/proximity_auth/ble/bluetooth_low_energy_connection.cc
|
| @@ -117,7 +117,7 @@ void BluetoothLowEnergyConnection::CreateGattConnection() {
|
| PA_LOG(INFO) << "Creating GATT connection with "
|
| << remote_device->GetAddress();
|
|
|
| - remote_device->CreateGattConnection(
|
| + gatt_connection_ = remote_device->CreateGattConnection(
|
| base::Bind(&BluetoothLowEnergyConnection::OnGattConnectionCreated,
|
| weak_ptr_factory_.GetWeakPtr()),
|
| base::Bind(&BluetoothLowEnergyConnection::OnCreateGattConnectionError,
|
| @@ -336,8 +336,7 @@ void BluetoothLowEnergyConnection::OnCreateGattConnectionError(
|
| Disconnect();
|
| }
|
|
|
| -void BluetoothLowEnergyConnection::OnGattConnectionCreated(
|
| - scoped_ptr<device::BluetoothGattConnection> gatt_connection) {
|
| +void BluetoothLowEnergyConnection::OnGattConnectionCreated() {
|
| DCHECK(sub_status() == SubStatus::WAITING_GATT_CONNECTION);
|
| PA_LOG(INFO) << "GATT connection with " << gatt_connection->GetDeviceAddress()
|
| << " created.";
|
| @@ -346,7 +345,6 @@ void BluetoothLowEnergyConnection::OnGattConnectionCreated(
|
| // Informing |bluetooth_trottler_| a new connection was established.
|
| bluetooth_throttler_->OnConnection(this);
|
|
|
| - gatt_connection_ = gatt_connection.Pass();
|
| SetSubStatus(SubStatus::WAITING_CHARACTERISTICS);
|
| characteristic_finder_.reset(CreateCharacteristicsFinder(
|
| base::Bind(&BluetoothLowEnergyConnection::OnCharacteristicsFound,
|
|
|