Chromium Code Reviews
DescriptionAllow interfaceClass USB device permissions
Introduces interfaceClass parameter to usbDevice permission.
The parameter is used to match permission to all USB device that
expose an interface with the provided class.
The interfaceClass permission will be matched against all interfaces
supported by any of USB device configurations.
USB device permission with interfaceClass set will only be taken
into account when determining device availability in kiosk sessions.
To support filtering devices that specify (only) device level class
(e.g. hub class is device descriptor class), when testing
interfaceClass permission parameter, take device class into account
(in addition to all interface classes).
Since extracting set of supported interfaces or a device is not as
trivial as getting vendor/product ID, introduce helper factory methods
for UsbDevicePermisison::CheckParam that will create check param for a
USB device. Also, since usbDevice permission is used by hid API too,
add a method for creating check param for HID devices. For those,
set of interface classes will be set to HID interface class: 3.
BUG=629223
Committed: https://crrev.com/2d0dff8d82ef6b4ba129f77f542e02391b7b04fb
Cr-Commit-Position: refs/heads/master@{#428154}
Patch Set 1 #Patch Set 2 : Allow interfaceClass USB device permissions #Patch Set 3 : unittests #Patch Set 4 : Allow interfaceClass USB device permissions #Patch Set 5 : Allow interfaceClass USB device permissions #
Total comments: 14
Patch Set 6 : comments addressed #Patch Set 7 : . #
Total comments: 2
Patch Set 8 : match against all configurations, not just the active one #
Total comments: 2
Patch Set 9 : comment on ForDeviceWithAnyInterfaceClass #
Total comments: 1
Patch Set 10 : . #Messages
Total messages: 39 (24 generated)
|