summaryrefslogtreecommitdiffstats
path: root/device
diff options
context:
space:
mode:
authorreillyg <reillyg@chromium.org>2016-03-03 17:13:36 -0800
committerCommit bot <commit-bot@chromium.org>2016-03-04 01:15:44 +0000
commitee8bc708fdfe52c34d39f5cc9a8407fe9cfb459c (patch)
tree6a43df82d61f65288bb1ae9632d73a08bf72fd0b /device
parentd285b019189141a8c235f9eed8764d6129043380 (diff)
downloadchromium_src-ee8bc708fdfe52c34d39f5cc9a8407fe9cfb459c.zip
chromium_src-ee8bc708fdfe52c34d39f5cc9a8407fe9cfb459c.tar.gz
chromium_src-ee8bc708fdfe52c34d39f5cc9a8407fe9cfb459c.tar.bz2
Check USB device permissions with a full device::usb::DeviceInfo.
UsbChooserContext::HasDevicePermission was originally written to take the device GUID. The problem with this is that it means that the device::UsbDevice object has to be looked up based on that GUID and if the device has been disconnected (as happens when trying to fire the navigator.usb.ondisconnect event) then that lookup fails and so the permission check always fails. Thus, no events are delivered. Instead, since WebUsbPermissionProvider has it anyways, HasDevicePermission can take the DeviceInfo object representing the device which has enough information to do a permission check even if the device has been disconnected. BUG=None Review URL: https://codereview.chromium.org/1747543002 Cr-Commit-Position: refs/heads/master@{#379161}
Diffstat (limited to 'device')
-rw-r--r--device/usb/mojo/type_converters.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/device/usb/mojo/type_converters.h b/device/usb/mojo/type_converters.h
index 4984c6e..002bb79 100644
--- a/device/usb/mojo/type_converters.h
+++ b/device/usb/mojo/type_converters.h
@@ -75,7 +75,7 @@ template <>
struct TypeConverter<device::usb::AlternateInterfaceInfoPtr,
device::UsbInterfaceDescriptor> {
static device::usb::AlternateInterfaceInfoPtr Convert(
- const device::UsbInterfaceDescriptor& interface);
+ const device::UsbInterfaceDescriptor& iface);
};
// Note that this is an explicit vector-to-array conversion, as