Chromium Code Reviews| Index: device/bluetooth/bluetooth_device.cc |
| diff --git a/device/bluetooth/bluetooth_device.cc b/device/bluetooth/bluetooth_device.cc |
| index 7d37591f5ea21483e15af7ab315436d3e8a6e70e..fa4322fcc17536f850ae286770d133e7585a904f 100644 |
| --- a/device/bluetooth/bluetooth_device.cc |
| +++ b/device/bluetooth/bluetooth_device.cc |
| @@ -26,7 +26,9 @@ BluetoothDevice::BluetoothDevice(BluetoothAdapter* adapter) |
| services_data_(new base::DictionaryValue()) {} |
| BluetoothDevice::~BluetoothDevice() { |
| - DidDisconnectGatt(); |
| + for (BluetoothGattConnection* connection : gatt_connections_) { |
|
Jeffrey Yasskin
2016/05/25 00:08:13
Also note this change to ~BluetoothDevice to avoid
scheib
2016/05/25 01:06:55
Acknowledged.
|
| + connection->InvalidateConnectionReference(); |
| + } |
| } |
| BluetoothDevice::ConnectionInfo::ConnectionInfo() |
| @@ -335,6 +337,7 @@ void BluetoothDevice::DidConnectGatt() { |
| } |
| create_gatt_connection_success_callbacks_.clear(); |
| create_gatt_connection_error_callbacks_.clear(); |
| + GetAdapter()->NotifyDeviceChanged(this); |
| } |
| void BluetoothDevice::DidFailToConnectGatt(ConnectErrorCode error) { |
| @@ -358,6 +361,7 @@ void BluetoothDevice::DidDisconnectGatt() { |
| connection->InvalidateConnectionReference(); |
| } |
| gatt_connections_.clear(); |
| + GetAdapter()->NotifyDeviceChanged(this); |
| } |
| void BluetoothDevice::AddGattConnection(BluetoothGattConnection* connection) { |