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

Issue 1316203006: Convert DeviceManagerDelegate to PermissionProvider mojo interface. (Closed)

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

Description

Convert DeviceManagerDelegate to PermissionProvider mojo interface. This changes the device::usb::DeviceManager service so that instead of expecting a C++ implementation of the DeviceManagerDelegate interface it depends on the client connecting to the devices app to provide an implementation of the PermissionProvider mojo service interface. This will allow the permissions checker to be injected by the FrameMojoShell when a renderer requests a connection to the devices app. BUG=492204 Committed: https://crrev.com/17b8a58c99537bab4d8944ec2f96023dac0a15e7 Cr-Commit-Position: refs/heads/master@{#347998}

Patch Set 1 : #

Total comments: 19

Patch Set 2 : Addressed rockot@'s comments. #

Total comments: 2

Patch Set 3 : Fewer braces. #

Patch Set 4 : Add permission check for OpenDevice. #

Patch Set 5 : Combine with WebUSBPermissionProvider change. #

Total comments: 11

Patch Set 6 : Addressed thestig@'s comments. #

Total comments: 4

Patch Set 7 : Add comment and move ctor. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+279 lines, -166 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 2 chunks +8 lines, -0 lines 0 comments Download
A chrome/browser/usb/DEPS View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
A + chrome/browser/usb/OWNERS View 1 2 3 4 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/browser/usb/web_usb_permission_provider.h View 1 2 3 4 5 6 1 chunk +38 lines, -0 lines 0 comments Download
A chrome/browser/usb/web_usb_permission_provider.cc View 1 2 3 4 5 6 1 chunk +38 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M device/BUILD.gn View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M device/devices_app/BUILD.gn View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M device/devices_app/devices_app.cc View 3 chunks +5 lines, -30 lines 0 comments Download
M device/devices_app/devices_app.gyp View 2 chunks +1 line, -1 line 0 comments Download
M device/devices_app/usb/device_manager_impl.h View 1 2 3 4 chunks +23 lines, -9 lines 0 comments Download
M device/devices_app/usb/device_manager_impl.cc View 1 2 3 6 chunks +119 lines, -62 lines 0 comments Download
M device/devices_app/usb/device_manager_impl_unittest.cc View 1 4 chunks +24 lines, -16 lines 0 comments Download
D device/devices_app/usb/public/cpp/BUILD.gn View 1 chunk +0 lines, -15 lines 0 comments Download
D device/devices_app/usb/public/cpp/device_manager_delegate.h View 1 chunk +0 lines, -27 lines 0 comments Download
M device/devices_app/usb/public/interfaces/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M device/devices_app/usb/public/interfaces/device_manager.mojom View 1 2 chunks +4 lines, -5 lines 0 comments Download
A device/devices_app/usb/public/interfaces/permission_provider.mojom View 1 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 35 (12 generated)
Reilly Grant (use Gerrit)
Please take a look.
5 years, 3 months ago (2015-09-02 01:13:56 UTC) #2
Ken Rockot(use gerrit already)
https://codereview.chromium.org/1316203006/diff/20001/device/devices_app/usb/device_manager_impl.cc File device/devices_app/usb/device_manager_impl.cc (right): https://codereview.chromium.org/1316203006/diff/20001/device/devices_app/usb/device_manager_impl.cc#newcode189 device/devices_app/usb/device_manager_impl.cc:189: DeviceManagerImpl::~DeviceManagerImpl() { nit: I totally missed this before, but ...
5 years, 3 months ago (2015-09-02 22:42:33 UTC) #4
Ken Rockot(use gerrit already)
https://codereview.chromium.org/1316203006/diff/20001/device/devices_app/usb/device_manager_impl.h File device/devices_app/usb/device_manager_impl.h (right): https://codereview.chromium.org/1316203006/diff/20001/device/devices_app/usb/device_manager_impl.h#newcode72 device/devices_app/usb/device_manager_impl.h:72: mojo::StrongBinding<DeviceManager> binding_; On 2015/09/02 22:42:33, Ken Rockot wrote: > ...
5 years, 3 months ago (2015-09-02 23:07:18 UTC) #5
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1316203006/diff/20001/device/devices_app/usb/device_manager_impl.cc File device/devices_app/usb/device_manager_impl.cc (right): https://codereview.chromium.org/1316203006/diff/20001/device/devices_app/usb/device_manager_impl.cc#newcode189 device/devices_app/usb/device_manager_impl.cc:189: DeviceManagerImpl::~DeviceManagerImpl() { On 2015/09/02 22:42:33, Ken Rockot wrote: > ...
5 years, 3 months ago (2015-09-02 23:58:20 UTC) #6
Ken Rockot(use gerrit already)
sweet, lgtm https://codereview.chromium.org/1316203006/diff/40001/device/devices_app/usb/device_manager_impl.cc File device/devices_app/usb/device_manager_impl.cc (right): https://codereview.chromium.org/1316203006/diff/40001/device/devices_app/usb/device_manager_impl.cc#newcode234 device/devices_app/usb/device_manager_impl.cc:234: for (size_t i = 0; i < ...
5 years, 3 months ago (2015-09-03 00:06:11 UTC) #7
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1316203006/diff/40001/device/devices_app/usb/device_manager_impl.cc File device/devices_app/usb/device_manager_impl.cc (right): https://codereview.chromium.org/1316203006/diff/40001/device/devices_app/usb/device_manager_impl.cc#newcode234 device/devices_app/usb/device_manager_impl.cc:234: for (size_t i = 0; i < devices.size(); ++i) ...
5 years, 3 months ago (2015-09-03 00:09:28 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1316203006/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1316203006/60001
5 years, 3 months ago (2015-09-03 00:31:36 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/107520)
5 years, 3 months ago (2015-09-03 01:17:09 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1316203006/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1316203006/60001
5 years, 3 months ago (2015-09-03 17:25:28 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/107867)
5 years, 3 months ago (2015-09-03 18:05:31 UTC) #17
Reilly Grant (use Gerrit)
Please take another look. I added a permission check for opening devices while I was ...
5 years, 3 months ago (2015-09-04 01:18:24 UTC) #18
Reilly Grant (use Gerrit)
Please take another look. I added a permission check for opening devices while I was ...
5 years, 3 months ago (2015-09-04 01:18:25 UTC) #19
Reilly Grant (use Gerrit)
Combined this with my WebUSBPermissionProvider change to try to figure out why one of the ...
5 years, 3 months ago (2015-09-05 00:04:22 UTC) #21
Lei Zhang
https://codereview.chromium.org/1316203006/diff/100001/chrome/browser/usb/web_usb_permission_provider.cc File chrome/browser/usb/web_usb_permission_provider.cc (right): https://codereview.chromium.org/1316203006/diff/100001/chrome/browser/usb/web_usb_permission_provider.cc#newcode14 chrome/browser/usb/web_usb_permission_provider.cc:14: DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); DCHECK_CURRENTLY_ON() https://codereview.chromium.org/1316203006/diff/100001/chrome/browser/usb/web_usb_permission_provider.cc#newcode34 chrome/browser/usb/web_usb_permission_provider.cc:34: ignore_result(render_frame_host_); What's this suppose to ...
5 years, 3 months ago (2015-09-05 00:24:20 UTC) #22
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1316203006/diff/100001/chrome/browser/usb/web_usb_permission_provider.cc File chrome/browser/usb/web_usb_permission_provider.cc (right): https://codereview.chromium.org/1316203006/diff/100001/chrome/browser/usb/web_usb_permission_provider.cc#newcode14 chrome/browser/usb/web_usb_permission_provider.cc:14: DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); On 2015/09/05 00:24:20, Lei Zhang wrote: > DCHECK_CURRENTLY_ON() ...
5 years, 3 months ago (2015-09-05 00:56:25 UTC) #23
Lei Zhang
lgtm https://codereview.chromium.org/1316203006/diff/100001/chrome/browser/usb/web_usb_permission_provider.cc File chrome/browser/usb/web_usb_permission_provider.cc (right): https://codereview.chromium.org/1316203006/diff/100001/chrome/browser/usb/web_usb_permission_provider.cc#newcode34 chrome/browser/usb/web_usb_permission_provider.cc:34: ignore_result(render_frame_host_); On 2015/09/05 00:56:25, Reilly Grant wrote: > ...
5 years, 3 months ago (2015-09-05 01:18:15 UTC) #24
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1316203006/diff/100001/chrome/browser/usb/web_usb_permission_provider.cc File chrome/browser/usb/web_usb_permission_provider.cc (right): https://codereview.chromium.org/1316203006/diff/100001/chrome/browser/usb/web_usb_permission_provider.cc#newcode34 chrome/browser/usb/web_usb_permission_provider.cc:34: ignore_result(render_frame_host_); On 2015/09/05 01:18:14, Lei Zhang wrote: > On ...
5 years, 3 months ago (2015-09-05 01:56:47 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1316203006/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1316203006/140001
5 years, 3 months ago (2015-09-05 02:09:31 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/99954)
5 years, 3 months ago (2015-09-05 03:13:12 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1316203006/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1316203006/140001
5 years, 3 months ago (2015-09-09 19:35:43 UTC) #32
commit-bot: I haz the power
Committed patchset #7 (id:140001)
5 years, 3 months ago (2015-09-09 20:59:05 UTC) #33
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/17b8a58c99537bab4d8944ec2f96023dac0a15e7 Cr-Commit-Position: refs/heads/master@{#347998}
5 years, 3 months ago (2015-09-09 20:59:53 UTC) #34
commit-bot: I haz the power
5 years, 3 months ago (2015-09-23 12:03:06 UTC) #35
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/17b8a58c99537bab4d8944ec2f96023dac0a15e7
Cr-Commit-Position: refs/heads/master@{#347998}

Powered by Google App Engine
This is Rietveld 408576698