Fix 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 Review-Url: https://codereview.chromium.org/2539593002 Cr-Commit-Position: refs/heads/master@{#435019}
Showing
Please register or sign in to comment