diff options
author | reillyg <reillyg@chromium.org> | 2014-09-25 15:02:48 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-25 22:02:59 +0000 |
commit | 43c5c906400e24aa59382d47a8654c35c2cb9cc6 (patch) | |
tree | 02b7cd45c0427ef2b005a31ef747c3d5fc415d89 /device/hid | |
parent | d0956cf3b7e8662b94e3ef26b4d685ddc6702a0a (diff) | |
download | chromium_src-43c5c906400e24aa59382d47a8654c35c2cb9cc6.zip chromium_src-43c5c906400e24aa59382d47a8654c35c2cb9cc6.tar.gz chromium_src-43c5c906400e24aa59382d47a8654c35c2cb9cc6.tar.bz2 |
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}
Diffstat (limited to 'device/hid')
-rw-r--r-- | device/hid/hid_connection_unittest.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/device/hid/hid_connection_unittest.cc b/device/hid/hid_connection_unittest.cc index 5c67edf..113b27e 100644 --- a/device/hid/hid_connection_unittest.cc +++ b/device/hid/hid_connection_unittest.cc @@ -100,7 +100,7 @@ class HidConnectionTest : public testing::Test { for (std::vector<HidDeviceInfo>::iterator it = devices.begin(); it != devices.end(); ++it) { - if (it->serial_number == test_gadget_->GetSerial()) { + if (it->serial_number == test_gadget_->GetSerialNumber()) { device_id_ = it->device_id; break; } |