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

Issue 15738004: Add a policy list for access to capture devices (Closed)

Created:
7 years, 7 months ago by tommi (sloooow) - chröme
Modified:
7 years, 6 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, joaodasilva+watch_chromium.org, battre
Visibility:
Public.

Description

Add a policy list for access to capture devices. The approach is slightly different from my proposal in the bug so that we have more configuration options as well as backwards compatibility with Chrome M25. This change introduces two new policy lists that allow admins to whitelist URLs to get no-prompt access to capture devices via URLs or URL patterns. The pattern matching is applied only to the security origin of the URLs. The behavior of the existing AudioCaptureAllowed and VideoCaptureAllowed is reverted back to how it was prior to r180416. This means that admins must use the whitelist to allow device access without prompt. If no match for a URL is found in the whitelists, the default behavior is determined by the [Audio|Video]CaptureAllowed policy value. BUG=225045 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=202572

Patch Set 1 #

Patch Set 2 : Change approach to make the configuration more flexible and backwards compatible. #

Patch Set 3 : Add tests and improve documentation #

Total comments: 8

Patch Set 4 : Change capture policy values to be per-profile. #

Total comments: 2

Patch Set 5 : Use ContentSettingsPattern instead of MatchPattern. #

Total comments: 9

Patch Set 6 : Address comments #

Patch Set 7 : Only allow the whitelist policy when kioskmode is enabled. #

Total comments: 2

Patch Set 8 : Rebase #

Patch Set 9 : Ignore wildcard entries #

Total comments: 1

Patch Set 10 : Check for kiosk mode on ChromeOS #

Patch Set 11 : initialize more cros singletons #

Patch Set 12 : Back out of mocking the world for cros #

Total comments: 17

Patch Set 13 : Address commentsDD #

Patch Set 14 : Updated policy_test_cases #

Total comments: 2

Patch Set 15 : Reference bug for code cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+301 lines, -33 lines) Patch
M chrome/app/policy/policy_templates.json View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +57 lines, -7 lines 0 comments Download
M chrome/browser/media/media_stream_devices_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/media/media_stream_devices_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +66 lines, -9 lines 0 comments Download
M chrome/browser/policy/configuration_policy_handler_list.cc View 1 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/policy/policy_browsertest.cc View 1 2 3 4 5 6 7 8 10 11 9 chunks +123 lines, -10 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +21 lines, -6 lines 0 comments Download
M chrome/test/data/policy/policy_test_cases.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +20 lines, -0 lines 0 comments Download

Messages

Total messages: 41 (0 generated)
tommi (sloooow) - chröme
Hey Mattias and Julian. I hope this approach will satisfy the requirements. Feel free to ...
7 years, 7 months ago (2013-05-22 17:01:44 UTC) #1
pastarmovj
I don't see issues with the policy structure but before I stamp it please run ...
7 years, 7 months ago (2013-05-23 08:33:12 UTC) #2
tommi (sloooow) - chröme
Thanks. I like the idea of showing the user what config the admin has applied ...
7 years, 7 months ago (2013-05-23 12:12:17 UTC) #3
Joao da Silva
I'd like to have input from the privacy folks regarding supporting patterns like "*" or ...
7 years, 7 months ago (2013-05-23 13:28:36 UTC) #4
tommi (sloooow) - chröme
https://codereview.chromium.org/15738004/diff/13001/chrome/browser/media/media_stream_devices_controller.cc File chrome/browser/media/media_stream_devices_controller.cc (right): https://codereview.chromium.org/15738004/diff/13001/chrome/browser/media/media_stream_devices_controller.cc#newcode216 chrome/browser/media/media_stream_devices_controller.cc:216: MatchPattern(request_.security_origin.spec(), value)) { On 2013/05/23 13:28:36, Joao da Silva ...
7 years, 7 months ago (2013-05-23 13:50:39 UTC) #5
tommi (sloooow) - chröme
oh and thanks for the feedback :)
7 years, 7 months ago (2013-05-23 13:51:06 UTC) #6
tommi (sloooow) - chröme
Switched over to using ContentSettingsPattern. PTAL.
7 years, 7 months ago (2013-05-23 14:24:01 UTC) #7
tommi (sloooow) - chröme
Just a heads-up that I'm going on vacation mid next week. I'd like to get ...
7 years, 7 months ago (2013-05-24 10:00:32 UTC) #8
markusheintz_
1) Policy Is there a particular reason why you don't integrate the new policy with ...
7 years, 7 months ago (2013-05-24 10:55:35 UTC) #9
Joao da Silva
Policy lgtm. There is UI in the content settings for the media settings, and it ...
7 years, 7 months ago (2013-05-24 12:48:01 UTC) #10
markusheintz_
https://codereview.chromium.org/15738004/diff/27001/chrome/browser/media/media_stream_devices_controller.cc File chrome/browser/media/media_stream_devices_controller.cc (right): https://codereview.chromium.org/15738004/diff/27001/chrome/browser/media/media_stream_devices_controller.cc#newcode230 chrome/browser/media/media_stream_devices_controller.cc:230: prefs->GetBoolean(policy_name)) { Will this not re-introduce the same issue ...
7 years, 7 months ago (2013-05-24 13:01:54 UTC) #11
tommi (sloooow) - chröme
Thanks for the quick turnaround. Sounds like we're all in agreement for how the UI ...
7 years, 7 months ago (2013-05-24 13:08:31 UTC) #12
markusheintz_
Can we please add a unittest for this? Please also file a bug for displaying ...
7 years, 7 months ago (2013-05-24 13:18:18 UTC) #13
markusheintz_
I quickly discussed the issue that we don't display the exceptions set via whitelist policy ...
7 years, 7 months ago (2013-05-24 13:41:07 UTC) #14
tommi (sloooow) - chröme
Thanks Markus. Sure, that's not a problem. Done and change uploaded.
7 years, 7 months ago (2013-05-24 16:46:15 UTC) #15
markusheintz_
On 2013/05/24 16:46:15, tommi wrote: > Thanks Markus. Sure, that's not a problem. Done and ...
7 years, 7 months ago (2013-05-24 16:49:25 UTC) #16
markusheintz_
Please Please Please let's have unittests for this. If not file at least a bug ...
7 years, 7 months ago (2013-05-24 16:53:57 UTC) #17
markusheintz_
https://codereview.chromium.org/15738004/diff/58001/chrome/browser/media/media_stream_devices_controller.cc File chrome/browser/media/media_stream_devices_controller.cc (right): https://codereview.chromium.org/15738004/diff/58001/chrome/browser/media/media_stream_devices_controller.cc#newcode223 chrome/browser/media/media_stream_devices_controller.cc:223: ContentSettingsPattern::FromString(value); On 2013/05/24 16:53:57, markusheintz_ wrote: > Please don't ...
7 years, 7 months ago (2013-05-24 17:03:25 UTC) #18
tommi (sloooow) - chröme
On 2013/05/24 16:53:57, markusheintz_ wrote: > Please Please Please let's have unittests for this. > ...
7 years, 7 months ago (2013-05-27 11:04:51 UTC) #19
tommi (sloooow) - chröme
On 2013/05/27 11:04:51, tommi wrote: > On 2013/05/24 16:53:57, markusheintz_ wrote: > > Please Please ...
7 years, 7 months ago (2013-05-27 11:11:55 UTC) #20
tommi (sloooow) - chröme
OK, the changes have been uploaded. ptal.
7 years, 7 months ago (2013-05-27 12:01:33 UTC) #21
markusheintz_
Sorry for the delay it's meeting Monday. We are almost there on last thing. https://codereview.chromium.org/15738004/diff/77001/chrome/browser/media/media_stream_devices_controller.cc ...
7 years, 7 months ago (2013-05-27 14:37:24 UTC) #22
tommi (sloooow) - chröme
On 2013/05/27 14:37:24, markusheintz_ wrote: > Sorry for the delay it's meeting Monday. > > ...
7 years, 7 months ago (2013-05-27 21:12:18 UTC) #23
Joao da Silva
https://codereview.chromium.org/15738004/diff/97001/chrome/browser/media/media_stream_devices_controller.cc File chrome/browser/media/media_stream_devices_controller.cc (right): https://codereview.chromium.org/15738004/diff/97001/chrome/browser/media/media_stream_devices_controller.cc#newcode233 chrome/browser/media/media_stream_devices_controller.cc:233: if (kiosk_mode && prefs->IsManagedPreference(whitelist_policy_name)) { IIUC the whitelist only ...
7 years, 7 months ago (2013-05-28 07:54:23 UTC) #24
markusheintz_
LGTM. Thanks a lot for going the extra rounds! :) https://codereview.chromium.org/15738004/diff/97001/chrome/browser/media/media_stream_devices_controller.cc File chrome/browser/media/media_stream_devices_controller.cc (right): https://codereview.chromium.org/15738004/diff/97001/chrome/browser/media/media_stream_devices_controller.cc#newcode50 ...
7 years, 7 months ago (2013-05-28 08:06:30 UTC) #25
Mattias Nissler (ping if slow)
Drive-by https://codereview.chromium.org/15738004/diff/97001/chrome/browser/media/media_stream_devices_controller.cc File chrome/browser/media/media_stream_devices_controller.cc (right): https://codereview.chromium.org/15738004/diff/97001/chrome/browser/media/media_stream_devices_controller.cc#newcode233 chrome/browser/media/media_stream_devices_controller.cc:233: if (kiosk_mode && prefs->IsManagedPreference(whitelist_policy_name)) { nit: You probably ...
7 years, 7 months ago (2013-05-28 08:11:39 UTC) #26
markusheintz_
https://codereview.chromium.org/15738004/diff/97001/chrome/browser/media/media_stream_devices_controller.cc File chrome/browser/media/media_stream_devices_controller.cc (right): https://codereview.chromium.org/15738004/diff/97001/chrome/browser/media/media_stream_devices_controller.cc#newcode233 chrome/browser/media/media_stream_devices_controller.cc:233: if (kiosk_mode && prefs->IsManagedPreference(whitelist_policy_name)) { On 2013/05/28 07:54:23, Joao ...
7 years, 7 months ago (2013-05-28 08:11:51 UTC) #27
markusheintz_
https://codereview.chromium.org/15738004/diff/97001/chrome/browser/media/media_stream_devices_controller.cc File chrome/browser/media/media_stream_devices_controller.cc (right): https://codereview.chromium.org/15738004/diff/97001/chrome/browser/media/media_stream_devices_controller.cc#newcode233 chrome/browser/media/media_stream_devices_controller.cc:233: if (kiosk_mode && prefs->IsManagedPreference(whitelist_policy_name)) { On 2013/05/28 08:11:39, Mattias ...
7 years, 7 months ago (2013-05-28 08:15:27 UTC) #28
Mattias Nissler (ping if slow)
https://codereview.chromium.org/15738004/diff/97001/chrome/browser/media/media_stream_devices_controller.cc File chrome/browser/media/media_stream_devices_controller.cc (right): https://codereview.chromium.org/15738004/diff/97001/chrome/browser/media/media_stream_devices_controller.cc#newcode233 chrome/browser/media/media_stream_devices_controller.cc:233: if (kiosk_mode && prefs->IsManagedPreference(whitelist_policy_name)) { On 2013/05/28 08:15:27, markusheintz_ ...
7 years, 6 months ago (2013-05-28 08:21:03 UTC) #29
markusheintz_
On 2013/05/28 08:21:03, Mattias Nissler wrote: > https://codereview.chromium.org/15738004/diff/97001/chrome/browser/media/media_stream_devices_controller.cc > File chrome/browser/media/media_stream_devices_controller.cc (right): > > https://codereview.chromium.org/15738004/diff/97001/chrome/browser/media/media_stream_devices_controller.cc#newcode233 ...
7 years, 6 months ago (2013-05-28 08:31:28 UTC) #30
Mattias Nissler (ping if slow)
On 2013/05/28 08:31:28, markusheintz_ wrote: > On 2013/05/28 08:21:03, Mattias Nissler wrote: > > > ...
7 years, 6 months ago (2013-05-28 08:57:47 UTC) #31
tommi (sloooow) - chröme
https://codereview.chromium.org/15738004/diff/97001/chrome/browser/media/media_stream_devices_controller.cc File chrome/browser/media/media_stream_devices_controller.cc (right): https://codereview.chromium.org/15738004/diff/97001/chrome/browser/media/media_stream_devices_controller.cc#newcode50 chrome/browser/media/media_stream_devices_controller.cc:50: return true; On 2013/05/28 08:06:31, markusheintz_ wrote: > Nit. ...
7 years, 6 months ago (2013-05-28 10:19:43 UTC) #32
tommi (sloooow) - chröme
All comments addressed (I believe) and changes uploaded. PTAL. https://codereview.chromium.org/15738004/diff/97001/chrome/test/data/policy/policy_test_cases.json File chrome/test/data/policy/policy_test_cases.json (right): https://codereview.chromium.org/15738004/diff/97001/chrome/test/data/policy/policy_test_cases.json#newcode967 chrome/test/data/policy/policy_test_cases.json:967: ...
7 years, 6 months ago (2013-05-28 10:52:48 UTC) #33
markusheintz_
On 2013/05/28 08:57:47, Mattias Nissler wrote: > On 2013/05/28 08:31:28, markusheintz_ wrote: > > On ...
7 years, 6 months ago (2013-05-28 11:13:49 UTC) #34
Mattias Nissler (ping if slow)
On 2013/05/28 11:13:49, markusheintz_ wrote: > On 2013/05/28 08:57:47, Mattias Nissler wrote: > > On ...
7 years, 6 months ago (2013-05-28 11:53:00 UTC) #35
Mattias Nissler (ping if slow)
LGTM https://codereview.chromium.org/15738004/diff/111001/chrome/browser/media/media_stream_devices_controller.h File chrome/browser/media/media_stream_devices_controller.h (right): https://codereview.chromium.org/15738004/diff/111001/chrome/browser/media/media_stream_devices_controller.h#newcode31 chrome/browser/media/media_stream_devices_controller.h:31: // TODO(tommi): Clean up all the policy code ...
7 years, 6 months ago (2013-05-28 11:55:23 UTC) #36
tommi (sloooow) - chröme
Thanks. Ping: pastarmovj, battre. At the end of today I'll be going on vacation so ...
7 years, 6 months ago (2013-05-28 12:11:02 UTC) #37
tommi (sloooow) - chröme
Moved battre@ to cc after discussing offline - Julian, that leaves you :)
7 years, 6 months ago (2013-05-28 12:17:51 UTC) #38
pastarmovj
lgtm
7 years, 6 months ago (2013-05-28 12:38:28 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tommi@chromium.org/15738004/125001
7 years, 6 months ago (2013-05-28 12:54:24 UTC) #40
commit-bot: I haz the power
7 years, 6 months ago (2013-05-28 15:26:22 UTC) #41
Message was sent while issue was closed.
Change committed as 202572

Powered by Google App Engine
This is Rietveld 408576698