Chromium Code Reviews| Index: content/browser/bluetooth/bluetooth_dispatcher_host.cc |
| diff --git a/content/browser/bluetooth/bluetooth_dispatcher_host.cc b/content/browser/bluetooth/bluetooth_dispatcher_host.cc |
| index 78d8c12391f6f614c079fccffdce789b86a95245..2c9a3eb4f04e2ef287131a7bb5c1b703a8290e1c 100644 |
| --- a/content/browser/bluetooth/bluetooth_dispatcher_host.cc |
| +++ b/content/browser/bluetooth/bluetooth_dispatcher_host.cc |
| @@ -483,6 +483,12 @@ void BluetoothDispatcherHost::set_adapter( |
| for (device::BluetoothAdapter::Observer* observer : adapter_observers_) { |
| adapter_->AddObserver(observer); |
| } |
| + } else { |
| + // Notify that the adapter has been removed and observers should clean up |
| + // their state. |
| + for (device::BluetoothAdapter::Observer* observer : adapter_observers_) { |
| + observer->AdapterPresentChanged(nullptr, false); |
|
Jeffrey Yasskin
2016/04/19 21:08:27
To be strictly correct, this should probably pass
ortuno
2016/04/19 21:36:32
In practice there will never be more than one adap
|
| + } |
| } |
| } |