| Index: content/browser/bluetooth/web_bluetooth_service_impl.cc
|
| diff --git a/content/browser/bluetooth/web_bluetooth_service_impl.cc b/content/browser/bluetooth/web_bluetooth_service_impl.cc
|
| index 978aa88468219fdf3c73719494ea4787aad60b7b..7f6228c080efc28a4702ce315697cb94102eaf8c 100644
|
| --- a/content/browser/bluetooth/web_bluetooth_service_impl.cc
|
| +++ b/content/browser/bluetooth/web_bluetooth_service_impl.cc
|
| @@ -91,7 +91,15 @@ void WebBluetoothServiceImpl::DidFinishNavigation(
|
| navigation_handle->GetRenderFrameHost() == render_frame_host_ &&
|
| !navigation_handle->IsSamePage()) {
|
| // After navigation we need to clear the frame's state.
|
| - characteristic_id_to_notify_session_.clear();
|
| + ClearState();
|
| + }
|
| +}
|
| +
|
| +void WebBluetoothServiceImpl::AdapterPresentChanged(
|
| + device::BluetoothAdapter* adapter,
|
| + bool present) {
|
| + if (!present) {
|
| + ClearState();
|
| }
|
| }
|
|
|
| @@ -376,4 +384,8 @@ url::Origin WebBluetoothServiceImpl::GetOrigin() {
|
| return render_frame_host_->GetLastCommittedOrigin();
|
| }
|
|
|
| +void WebBluetoothServiceImpl::ClearState() {
|
| + characteristic_id_to_notify_session_.clear();
|
| +}
|
| +
|
| } // namespace content
|
|
|