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

Issue 1847183002: Use interface associations to check function permissions. (Closed)

Created:
4 years, 8 months ago by Reilly Grant (use Gerrit)
Modified:
4 years, 8 months ago
Reviewers:
juncai
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use interface associations to check function permissions. This patch expands on r383543 to use correctly use the interface associations parsed out of device descriptors to allow WebUSB access controls to be specified at a function, rather than interface, level. BUG=492204 TBR=pfeldman@chromium.org Committed: https://crrev.com/1f45f77b4fa4afef5b1abeda6bfed21485630d90 Cr-Commit-Position: refs/heads/master@{#384785}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Fixed browser_test build and addressed juncai@'s comments. #

Total comments: 2

Patch Set 3 : Addressed nit and fixed Windows build. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+168 lines, -129 lines) Patch
M chrome/browser/devtools/device/usb/android_usb_browsertest.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/usb/web_usb_permission_provider.h View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/usb/web_usb_permission_provider.cc View 3 chunks +5 lines, -7 lines 0 comments Download
M device/BUILD.gn View 1 chunk +2 lines, -2 lines 0 comments Download
M device/device_tests.gyp View 1 chunk +2 lines, -2 lines 0 comments Download
M device/usb/mock_usb_device_handle.h View 1 chunk +2 lines, -2 lines 0 comments Download
M device/usb/mojo/device_impl.cc View 1 2 chunks +28 lines, -9 lines 0 comments Download
M device/usb/mojo/device_impl_unittest.cc View 11 chunks +10 lines, -3 lines 0 comments Download
M device/usb/mojo/device_manager_impl_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
D device/usb/mojo/fake_permission_provider.h View 1 chunk +0 lines, -36 lines 0 comments Download
D device/usb/mojo/fake_permission_provider.cc View 1 chunk +0 lines, -40 lines 0 comments Download
A device/usb/mojo/mock_permission_provider.h View 1 2 1 chunk +39 lines, -0 lines 0 comments Download
A device/usb/mojo/mock_permission_provider.cc View 1 chunk +31 lines, -0 lines 0 comments Download
M device/usb/mojo/permission_provider.h View 1 chunk +3 lines, -3 lines 0 comments Download
M device/usb/mojo/type_converters.cc View 1 chunk +1 line, -0 lines 0 comments Download
M device/usb/public/interfaces/device.mojom View 1 chunk +3 lines, -0 lines 0 comments Download
M device/usb/usb_device_handle.h View 1 chunk +3 lines, -3 lines 0 comments Download
M device/usb/usb_device_handle_impl.h View 2 chunks +4 lines, -4 lines 0 comments Download
M device/usb/usb_device_handle_impl.cc View 1 2 4 chunks +8 lines, -11 lines 0 comments Download
M device/usb/usb_device_handle_unittest.cc View 2 chunks +20 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (7 generated)
Reilly Grant (use Gerrit)
Please take a look.
4 years, 8 months ago (2016-03-31 20:48:13 UTC) #2
Reilly Grant (use Gerrit)
Please take a look.
4 years, 8 months ago (2016-03-31 20:48:18 UTC) #3
juncai
https://codereview.chromium.org/1847183002/diff/1/device/usb/mojo/device_impl.cc File device/usb/mojo/device_impl.cc (right): https://codereview.chromium.org/1847183002/diff/1/device/usb/mojo/device_impl.cc#newcode174 device/usb/mojo/device_impl.cc:174: [index](const UsbInterfaceDescriptor& interface) { This |interface| has the same ...
4 years, 8 months ago (2016-04-01 16:49:41 UTC) #4
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1847183002/diff/1/device/usb/mojo/device_impl.cc File device/usb/mojo/device_impl.cc (right): https://codereview.chromium.org/1847183002/diff/1/device/usb/mojo/device_impl.cc#newcode174 device/usb/mojo/device_impl.cc:174: [index](const UsbInterfaceDescriptor& interface) { On 2016/04/01 at 16:49:41, juncai ...
4 years, 8 months ago (2016-04-01 21:46:57 UTC) #5
juncai
LGTM with nit. https://codereview.chromium.org/1847183002/diff/20001/device/usb/mojo/mock_permission_provider.h File device/usb/mojo/mock_permission_provider.h (right): https://codereview.chromium.org/1847183002/diff/20001/device/usb/mojo/mock_permission_provider.h#newcode5 device/usb/mojo/mock_permission_provider.h:5: #ifndef DEVICE_USB_MOCK_PERMISSION_PROVIDER_H_ nit: add "_MOJO" substring ...
4 years, 8 months ago (2016-04-02 00:16:04 UTC) #6
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1847183002/diff/20001/device/usb/mojo/mock_permission_provider.h File device/usb/mojo/mock_permission_provider.h (right): https://codereview.chromium.org/1847183002/diff/20001/device/usb/mojo/mock_permission_provider.h#newcode5 device/usb/mojo/mock_permission_provider.h:5: #ifndef DEVICE_USB_MOCK_PERMISSION_PROVIDER_H_ On 2016/04/02 at 00:16:04, juncai wrote: > ...
4 years, 8 months ago (2016-04-02 01:35:45 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1847183002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1847183002/40001
4 years, 8 months ago (2016-04-02 01:36:17 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/163862)
4 years, 8 months ago (2016-04-02 01:46:05 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1847183002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1847183002/40001
4 years, 8 months ago (2016-04-02 01:46:55 UTC) #15
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 8 months ago (2016-04-02 02:47:04 UTC) #16
commit-bot: I haz the power
4 years, 8 months ago (2016-04-02 02:48:16 UTC) #18
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/1f45f77b4fa4afef5b1abeda6bfed21485630d90
Cr-Commit-Position: refs/heads/master@{#384785}

Powered by Google App Engine
This is Rietveld 408576698