Move string descriptor getters from UsbDeviceHandle to UsbDevice.
The common string descriptors: iManufacturer, iProduct and iSerialNumber should be accessible without opening the device. On Linux these can be read out of sysfs without having access to the usbfs device node. This is critical on Chrome OS because otherwise the permission broker needs to be asked for permission to access the device. On other platforms we fall back to opening the device temporarily. This will stop being the case on OS X when libusb is no longer used and on Windows this will be part of the initial enumeration process. BUG= TBR=dgozman@chromium.org Review URL: https://codereview.chromium.org/601073002 Cr-Commit-Position: refs/heads/master@{#296802}
Showing
This diff is collapsed.
Please register or sign in to comment