Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Issue 601073002: Move string descriptor getters from UsbDeviceHandle to UsbDevice. (Closed)

Created:
6 years, 3 months ago by Reilly Grant (use Gerrit)
Modified:
6 years, 2 months ago
Reviewers:
scheib, rpaquay
CC:
chromium-reviews, extensions-reviews_chromium.org, vsevik, tfarina, yurys, paulirish+reviews_chromium.org, devtools-reviews_chromium.org, chromium-apps-reviews_chromium.org, aandrey+blink_chromium.org, pfeldman
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/43c5c906400e24aa59382d47a8654c35c2cb9cc6 Cr-Commit-Position: refs/heads/master@{#296802}

Patch Set 1 #

Total comments: 10

Patch Set 2 : Updated comments. #

Patch Set 3 : Fix function order. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+345 lines, -324 lines) Patch
M apps/saved_devices_service.cc View 1 chunk +1 line, -5 lines 0 comments Download
M apps/saved_devices_service_unittest.cc View 1 chunk +10 lines, -71 lines 0 comments Download
M chrome/browser/devtools/device/usb/android_usb_browsertest.cc View 2 chunks +17 lines, -14 lines 0 comments Download
M chrome/browser/devtools/device/usb/android_usb_device.cc View 1 chunk +1 line, -1 line 0 comments Download
M device/hid/hid_connection_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M device/test/usb_test_gadget.h View 1 chunk +1 line, -1 line 0 comments Download
M device/test/usb_test_gadget_impl.cc View 5 chunks +5 lines, -15 lines 0 comments Download
M device/usb/usb_device.h View 1 2 chunks +13 lines, -0 lines 0 comments Download
M device/usb/usb_device_filter_unittest.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M device/usb/usb_device_handle.h View 1 1 chunk +4 lines, -3 lines 0 comments Download
M device/usb/usb_device_handle_impl.h View 2 chunks +3 lines, -4 lines 0 comments Download
M device/usb/usb_device_handle_impl.cc View 1 2 4 chunks +124 lines, -184 lines 0 comments Download
M device/usb/usb_device_impl.h View 2 chunks +12 lines, -0 lines 0 comments Download
M device/usb/usb_device_impl.cc View 4 chunks +138 lines, -0 lines 0 comments Download
M device/usb/usb_service_unittest.cc View 1 chunk +5 lines, -12 lines 0 comments Download
M extensions/browser/api/usb/usb_apitest.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M extensions/browser/api/usb_private/usb_private_api.cc View 2 chunks +3 lines, -10 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
Reilly Grant (use Gerrit)
6 years, 2 months ago (2014-09-25 03:55:52 UTC) #2
scheib
https://codereview.chromium.org/601073002/diff/1/device/usb/usb_device.h File device/usb/usb_device.h (right): https://codereview.chromium.org/601073002/diff/1/device/usb/usb_device.h#newcode58 device/usb/usb_device.h:58: // Gets the manufacturer string from the device. "from ...
6 years, 2 months ago (2014-09-25 17:36:04 UTC) #4
Reilly Grant (use Gerrit)
https://codereview.chromium.org/601073002/diff/1/device/usb/usb_device.h File device/usb/usb_device.h (right): https://codereview.chromium.org/601073002/diff/1/device/usb/usb_device.h#newcode58 device/usb/usb_device.h:58: // Gets the manufacturer string from the device. On ...
6 years, 2 months ago (2014-09-25 17:58:45 UTC) #5
scheib
lgtm, but please pick one of the options below: https://codereview.chromium.org/601073002/diff/1/device/usb/usb_device_handle_impl.cc File device/usb/usb_device_handle_impl.cc (right): https://codereview.chromium.org/601073002/diff/1/device/usb/usb_device_handle_impl.cc#newcode412 device/usb/usb_device_handle_impl.cc:412: ...
6 years, 2 months ago (2014-09-25 19:47:05 UTC) #6
Reilly Grant (use Gerrit)
https://codereview.chromium.org/601073002/diff/1/device/usb/usb_device_handle_impl.cc File device/usb/usb_device_handle_impl.cc (right): https://codereview.chromium.org/601073002/diff/1/device/usb/usb_device_handle_impl.cc#newcode412 device/usb/usb_device_handle_impl.cc:412: bool UsbDeviceHandleImpl::GetStringDescriptor(uint8 string_id, On 2014/09/25 19:47:05, scheib wrote: > ...
6 years, 2 months ago (2014-09-25 19:55:15 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/601073002/40001
6 years, 2 months ago (2014-09-25 20:48:04 UTC) #9
commit-bot: I haz the power
Committed patchset #3 (id:40001) as 201f948f2d0f48ee7d427611ad286320b6f4f211
6 years, 2 months ago (2014-09-25 22:02:55 UTC) #10
commit-bot: I haz the power
6 years, 2 months ago (2014-09-25 22:03:40 UTC) #11
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/43c5c906400e24aa59382d47a8654c35c2cb9cc6
Cr-Commit-Position: refs/heads/master@{#296802}

Powered by Google App Engine
This is Rietveld 408576698