New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 749845 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Feature



Sign in to add a comment

Testability: don't require user-data-dir flag to skip protected media identifier permission

Project Member Reported by crouleau@google.com, Jul 27 2017

Issue description

Currently 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.
 

Comment 1 by crouleau@google.com, Jul 27 2017

Labels: -Type-Bug Type-Feature

Comment 2 by xhw...@chromium.org, Jul 27 2017

Summary: Testability: don't require user-data-dir flag to skip protected media identifier permission (was: Testability: don't require user-data-dir flag to enable protected content playback)

Comment 3 by xhw...@chromium.org, Jul 27 2017

Cc: vaage@google.com raymes@chromium.org ddorwin@chromium.org
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.
Project Member

Comment 4 by bugdroid1@chromium.org, 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

Status: Fixed (was: Assigned)
Thanks Xiaohan!

Sign in to add a comment