Testability: don't require user-data-dir flag to skip protected media identifier permission |
||||
Issue descriptionCurrently you need to set the user-data-dir flag to allow the unsafely-allow-protected-media-identifier-for-domain flag to work. This is a pain for tests since we don't always specify a user-data-dir.
,
Jul 27 2017
,
Jul 27 2017
This is especially painful on Android since the default user-data-dir is application specific (e.g. `/data/user/0/com.android.chrome/app_chrome`). Since there's only one profile on Clank, tests doesn't always specify user-data-dir. Also, user's main profile will not be touched when we enable the switch to skip the permission check. So there's no risk that we contaminate user's main profile. With that, I suggest we simply drop the requirement of requiring user-data-dir to enable this switch.
,
Jul 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2bbcc10e9fa88560327db1861cb3378f228050be commit 2bbcc10e9fa88560327db1861cb3378f228050be Author: Xiaohan Wang <xhwang@chromium.org> Date: Fri Jul 28 18:10:37 2017 media: Remove user-data-dir requirement on kUnsafelyAllowProtectedMediaIdentifierForDomain flag We already have multiple layers of protection around this flag on ChromeOS and Android: 1. The flag name is prefixed with "unsafely". 2. On Android and ChromeOS: It's not trivial for users to enable command line flags. 3. This is already marked as "bad flag" so user would see the yellow warning bar (see bad_flags_prompt.cc). 4. Enabling this flag will not change anything in user's profile, it just skip checking user's settings. With that, I feel also requiring user-data-dir is a bit overkill. This actually introduced some complexity in our tests, e.g. - A test may want to use the default profile. - It's not super trivial to set user-data-dir on Android. This CL removes the user-data-dir requirement using kUnsafelyAllowProtectedMediaIdentifierForDomain. BUG= 749845 TEST=Manually tested Change-Id: I7b389315b4257675d7ade07c0432432d7c847cb4 Reviewed-on: https://chromium-review.googlesource.com/590631 Reviewed-by: Raymes Khoury <raymes@chromium.org> Reviewed-by: John Rummell <jrummell@chromium.org> Commit-Queue: Xiaohan Wang <xhwang@chromium.org> Cr-Commit-Position: refs/heads/master@{#490465} [modify] https://crrev.com/2bbcc10e9fa88560327db1861cb3378f228050be/chrome/browser/media/protected_media_identifier_permission_context.cc [modify] https://crrev.com/2bbcc10e9fa88560327db1861cb3378f228050be/chrome/browser/media/protected_media_identifier_permission_context_unittest.cc [modify] https://crrev.com/2bbcc10e9fa88560327db1861cb3378f228050be/media/base/media_switches.cc
,
Jul 28 2017
Thanks Xiaohan! |
||||
►
Sign in to add a comment |
||||
Comment 1 by crouleau@google.com
, Jul 27 2017