DescriptionFix blank names issue for navigator.usb.requestDevice
Sometimes UsbDevice::product_string() returns empty string, and the
current WebUSB chooser uses it as the device name to be displayed.
This CL fixes the blank name issue by displaying, in decreasing order
of preference:
1. UsbDevice::product_string()
2. UsbIds::GetProductName()
3. "Unknown device from " + UsbIds::GetVendorName()
4. "Unknown device [$VID:$PID]"
BUG=665599
Committed: https://crrev.com/06198969e3c76b4999cbdf1a474bb4f94ee275cd
Cr-Commit-Position: refs/heads/master@{#435019}
Patch Set 1 : fix blank names issue for navigator.usb.requestDevice #
Messages
Total messages: 13 (8 generated)
|