| 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 c4fe0562a92f8f147fdd61ae4439257845369cd6..d1d2541aac71d207e89d8afc152d105078395ab3 100644
|
| --- a/content/browser/bluetooth/bluetooth_dispatcher_host.cc
|
| +++ b/content/browser/bluetooth/bluetooth_dispatcher_host.cc
|
| @@ -25,6 +25,7 @@
|
| #include "content/browser/bluetooth/first_device_bluetooth_chooser.h"
|
| #include "content/browser/frame_host/render_frame_host_impl.h"
|
| #include "content/common/bluetooth/bluetooth_messages.h"
|
| +#include "content/public/browser/content_browser_client.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "content/public/browser/web_contents_delegate.h"
|
| #include "device/bluetooth/bluetooth_adapter.h"
|
| @@ -1092,6 +1093,14 @@ void BluetoothDispatcherHost::OnRequestDeviceImpl(
|
| return;
|
| }
|
|
|
| + if (!GetContentClient()->browser()->AllowWebBluetooth()) {
|
| + RecordRequestDeviceOutcome(
|
| + UMARequestDeviceOutcome::BLUETOOTH_CHOOSER_GLOBALLY_DISABLED);
|
| + Send(new BluetoothMsg_RequestDeviceError(
|
| + thread_id, request_id, WebBluetoothError::ChooserDisabled));
|
| + return;
|
| + }
|
| +
|
| // Create storage for the information that backs the chooser, and show the
|
| // chooser.
|
| RequestDeviceSession* const session =
|
|
|