| Index: chrome/browser/extensions/api/bluetooth_socket/bluetooth_socket_api.cc
|
| diff --git a/chrome/browser/extensions/api/bluetooth_socket/bluetooth_socket_api.cc b/chrome/browser/extensions/api/bluetooth_socket/bluetooth_socket_api.cc
|
| index 49143d4e081da560a6e801d19d88d018d62b216c..1005cc07879507aea6ea2d46d79c174a1e1d4263 100644
|
| --- a/chrome/browser/extensions/api/bluetooth_socket/bluetooth_socket_api.cc
|
| +++ b/chrome/browser/extensions/api/bluetooth_socket/bluetooth_socket_api.cc
|
| @@ -97,6 +97,11 @@ bool BluetoothSocketAsyncApiFunction::RunAsync() {
|
| }
|
|
|
| bool BluetoothSocketAsyncApiFunction::PrePrepare() {
|
| + if (!BluetoothManifestData::CheckSocketPermitted(GetExtension())) {
|
| + error_ = kPermissionDeniedError;
|
| + return false;
|
| + }
|
| +
|
| manager_ = ApiResourceManager<BluetoothApiSocket>::Get(browser_context());
|
| DCHECK(manager_)
|
| << "There is no socket manager. "
|
|
|