summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/api/hid
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions/api/hid')
-rw-r--r--chrome/browser/extensions/api/hid/hid_api.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/extensions/api/hid/hid_api.cc b/chrome/browser/extensions/api/hid/hid_api.cc
index 6d41ad8..2462384 100644
--- a/chrome/browser/extensions/api/hid/hid_api.cc
+++ b/chrome/browser/extensions/api/hid/hid_api.cc
@@ -87,8 +87,8 @@ void HidGetDevicesFunction::AsyncWorkStart() {
const uint16_t product_id = parameters_->options.product_id;
UsbDevicePermission::CheckParam param(
vendor_id, product_id, UsbDevicePermissionData::UNSPECIFIED_INTERFACE);
- if (!PermissionsData::ForExtension(GetExtension())
- ->CheckAPIPermissionWithParam(APIPermission::kUsbDevice, &param)) {
+ if (!GetExtension()->permissions_data()->CheckAPIPermissionWithParam(
+ APIPermission::kUsbDevice, &param)) {
LOG(WARNING) << "Insufficient permissions to access device.";
CompleteWithError(kErrorPermissionDenied);
return;
@@ -119,8 +119,8 @@ void HidConnectFunction::AsyncWorkStart() {
device_info.vendor_id,
device_info.product_id,
UsbDevicePermissionData::UNSPECIFIED_INTERFACE);
- if (!PermissionsData::ForExtension(GetExtension())
- ->CheckAPIPermissionWithParam(APIPermission::kUsbDevice, &param)) {
+ if (!GetExtension()->permissions_data()->CheckAPIPermissionWithParam(
+ APIPermission::kUsbDevice, &param)) {
LOG(WARNING) << "Insufficient permissions to access device.";
CompleteWithError(kErrorPermissionDenied);
return;