summaryrefslogtreecommitdiffstats
path: root/device/usb/usb_device_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'device/usb/usb_device_impl.h')
-rw-r--r--device/usb/usb_device_impl.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/device/usb/usb_device_impl.h b/device/usb/usb_device_impl.h
index 9a14947..2718998 100644
--- a/device/usb/usb_device_impl.h
+++ b/device/usb/usb_device_impl.h
@@ -56,20 +56,25 @@ class UsbDeviceImpl : public UsbDevice {
virtual ~UsbDeviceImpl();
- // Called only be UsbService.
+ // Called only by UsbService.
void OnDisconnect();
private:
base::ThreadChecker thread_checker_;
PlatformUsbDevice platform_device_;
-#if defined(USE_UDEV)
// On Linux these properties are read from sysfs when the device is enumerated
// to avoid hitting the permission broker on Chrome OS for a real string
// descriptor request.
- std::string manufacturer_;
- std::string product_;
- std::string serial_number_;
+ base::string16 manufacturer_;
+ base::string16 product_;
+ base::string16 serial_number_;
+#if !defined(USE_UDEV)
+ // On other platforms the device must be opened in order to cache them. This
+ // should be delayed until the strings are needed to avoid poor interactions
+ // with other applications.
+ void CacheStrings();
+ bool strings_cached_;
#endif
// The active configuration descriptor is not read immediately but cached for