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

Issue 2436113002: Introduce MediaDevicesPermissionChecker. (Closed)

Created:
4 years, 2 months ago by Guido Urdaneta
Modified:
4 years, 1 month ago
CC:
chromium-reviews, creis+watch_chromium.org, posciak+watch_chromium.org, nasko+codewatch_chromium.org, jam, feature-media-reviews_chromium.org, darin-cc_chromium.org, mcasas+watch+vc_chromium.org, miu+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce MediaDevicesPermissionChecker. This class makes it easier to check device permissions. It is similar to MediaStreamUIProxy, but it has the following advantages: * Easier to check permissions for multiple device types in a single call. * Uses MediaDeviceType instead of MediaStreamType to refer to device types. * Simpler design. Current users are MediaDevicesDispatcherHost and AudioRendererHost. This will make it easier to check for permissions in the mojo version of devicechange notifications. Once MediaDevice permissions are revamped, maybe this class might substitute MediaStreamUIProxy. Originally, the intention was to use PermissionManager, but several tests expect permissions to be checked via the RenderFrameHostDelegate, so this will have to wait. Also, the plan was to place this in content/browser/renderer_host/media since it is used only by *Host classes, but it is illegal to include "content/browser/frame_host" from there (MediaStreamUIProxy got a free pass). BUG=648183 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/df036b3c1846ea332f5196edd6f578f802cb8ef7 Cr-Commit-Position: refs/heads/master@{#428709}

Patch Set 1 #

Total comments: 15

Patch Set 2 : address xhwang's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+292 lines, -190 lines) Patch
M content/browser/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 chunk +1 line, -3 lines 0 comments Download
A content/browser/media/media_devices_permission_checker.h View 1 1 chunk +90 lines, -0 lines 0 comments Download
A content/browser/media/media_devices_permission_checker.cc View 1 1 chunk +155 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/audio_renderer_host.h View 2 chunks +1 line, -3 lines 0 comments Download
M content/browser/renderer_host/media/audio_renderer_host.cc View 2 chunks +9 lines, -19 lines 0 comments Download
M content/browser/renderer_host/media/media_devices_dispatcher_host.h View 5 chunks +5 lines, -44 lines 0 comments Download
M content/browser/renderer_host/media/media_devices_dispatcher_host.cc View 4 chunks +13 lines, -89 lines 0 comments Download
M content/browser/renderer_host/media/media_devices_dispatcher_host_unittest.cc View 1 3 chunks +16 lines, -32 lines 0 comments Download

Messages

Total messages: 29 (15 generated)
Guido Urdaneta
Hi, PTAL
4 years, 2 months ago (2016-10-20 17:43:18 UTC) #6
Guido Urdaneta
alexmos@chromium.org: please review changes in content/browser/frame_host
4 years, 2 months ago (2016-10-21 15:42:17 UTC) #11
Guido Urdaneta
xhwang@chromium.org: please review changes in content/browser/media alexmos@chromium.org: please review changes in content/browser/frame_host
4 years, 1 month ago (2016-10-28 08:53:56 UTC) #13
tommi (sloooow) - chröme
lgtm https://codereview.chromium.org/2436113002/diff/1/content/browser/media/media_devices_permission_checker.cc File content/browser/media/media_devices_permission_checker.cc (right): https://codereview.chromium.org/2436113002/diff/1/content/browser/media/media_devices_permission_checker.cc#newcode150 content/browser/media/media_devices_permission_checker.cc:150: use_override_ = true; nit: would it make sense ...
4 years, 1 month ago (2016-10-28 09:36:52 UTC) #14
Guido Urdaneta
https://codereview.chromium.org/2436113002/diff/1/content/browser/media/media_devices_permission_checker.cc File content/browser/media/media_devices_permission_checker.cc (right): https://codereview.chromium.org/2436113002/diff/1/content/browser/media/media_devices_permission_checker.cc#newcode150 content/browser/media/media_devices_permission_checker.cc:150: use_override_ = true; On 2016/10/28 09:36:52, tommi (chrömium) wrote: ...
4 years, 1 month ago (2016-10-28 10:06:55 UTC) #15
alexmos
frame_host LGTM
4 years, 1 month ago (2016-10-28 17:01:54 UTC) #16
xhwang
lgtm % nits https://codereview.chromium.org/2436113002/diff/1/content/browser/media/media_devices_permission_checker.h File content/browser/media/media_devices_permission_checker.h (right): https://codereview.chromium.org/2436113002/diff/1/content/browser/media/media_devices_permission_checker.h#newcode5 content/browser/media/media_devices_permission_checker.h:5: #ifndef CONTENT_BROWSER_MEDIA_MEDIA_DEVICES_PERMISSION_CHECKER_H_ OOC, can we put ...
4 years, 1 month ago (2016-10-28 17:14:56 UTC) #17
Guido Urdaneta
https://codereview.chromium.org/2436113002/diff/1/content/browser/media/media_devices_permission_checker.h File content/browser/media/media_devices_permission_checker.h (right): https://codereview.chromium.org/2436113002/diff/1/content/browser/media/media_devices_permission_checker.h#newcode5 content/browser/media/media_devices_permission_checker.h:5: #ifndef CONTENT_BROWSER_MEDIA_MEDIA_DEVICES_PERMISSION_CHECKER_H_ On 2016/10/28 17:14:56, xhwang wrote: > OOC, ...
4 years, 1 month ago (2016-10-29 19:34:38 UTC) #18
xhwang
lgtm++ https://codereview.chromium.org/2436113002/diff/1/content/browser/media/media_devices_permission_checker.h File content/browser/media/media_devices_permission_checker.h (right): https://codereview.chromium.org/2436113002/diff/1/content/browser/media/media_devices_permission_checker.h#newcode5 content/browser/media/media_devices_permission_checker.h:5: #ifndef CONTENT_BROWSER_MEDIA_MEDIA_DEVICES_PERMISSION_CHECKER_H_ On 2016/10/29 19:34:38, Guido Urdaneta wrote: ...
4 years, 1 month ago (2016-10-30 16:18:27 UTC) #19
Guido Urdaneta
avi@chromium.org: Can you rs? Also, do you have any advice wrt xhwangs@'s comment about placing ...
4 years, 1 month ago (2016-10-31 09:38:26 UTC) #21
Avi (use Gerrit)
On 2016/10/31 09:38:26, Guido Urdaneta wrote: > mailto:avi@chromium.org: Can you rs? > > Also, do ...
4 years, 1 month ago (2016-10-31 13:22:15 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2436113002/20001
4 years, 1 month ago (2016-10-31 13:23:13 UTC) #25
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 1 month ago (2016-10-31 14:51:45 UTC) #27
commit-bot: I haz the power
4 years, 1 month ago (2016-10-31 14:55:00 UTC) #29
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/df036b3c1846ea332f5196edd6f578f802cb8ef7
Cr-Commit-Position: refs/heads/master@{#428709}

Powered by Google App Engine
This is Rietveld 408576698