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

Issue 689778 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 1
Type: Bug

Blocking:
issue 686430



Sign in to add a comment

Add a preference to enable encrypted media

Project Member Reported by xhw...@chromium.org, Feb 8 2017

Issue description

We need a new preference to enable/disable encrypted media, or some features of it.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d252d7b55af16f3edbb90d1132cf6ff360f7d11f

commit d252d7b55af16f3edbb90d1132cf6ff360f7d11f
Author: xhwang <xhwang@chromium.org>
Date: Wed Feb 08 18:52:36 2017

media: Add a web preference to enable encrypted media

Add a WebPreference encrypted_media_enabled. If it's set to false, all requestMediaKeySystemAccess() calls will return a rejected promise with NotSupportedError.

Also connect |encrypted_media_enabled| with a new Chrome preference kWebKitEncryptedMediaEnabled and make sure when user changes that preference, the Web preference in the renderer process will get updated.

Note that the check is only done in requestMediaKeySystemAccess(). So if a user disabled the preference after a protected content playback already started, the playback session will not be affected. However, all newer protected content playback attempt will fail.

BUG= 689778 
TEST=Manually tested.

Review-Url: https://codereview.chromium.org/2676633006
Cr-Commit-Position: refs/heads/master@{#449048}

[modify] https://crrev.com/d252d7b55af16f3edbb90d1132cf6ff360f7d11f/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/d252d7b55af16f3edbb90d1132cf6ff360f7d11f/chrome/browser/media/encrypted_media_browsertest.cc
[modify] https://crrev.com/d252d7b55af16f3edbb90d1132cf6ff360f7d11f/chrome/browser/ui/prefs/prefs_tab_helper.cc
[modify] https://crrev.com/d252d7b55af16f3edbb90d1132cf6ff360f7d11f/chrome/common/pref_names.cc
[modify] https://crrev.com/d252d7b55af16f3edbb90d1132cf6ff360f7d11f/chrome/common/pref_names.h
[modify] https://crrev.com/d252d7b55af16f3edbb90d1132cf6ff360f7d11f/content/public/common/common_param_traits_macros.h
[modify] https://crrev.com/d252d7b55af16f3edbb90d1132cf6ff360f7d11f/content/public/common/web_preferences.cc
[modify] https://crrev.com/d252d7b55af16f3edbb90d1132cf6ff360f7d11f/content/public/common/web_preferences.h
[modify] https://crrev.com/d252d7b55af16f3edbb90d1132cf6ff360f7d11f/content/renderer/render_view_impl.cc
[modify] https://crrev.com/d252d7b55af16f3edbb90d1132cf6ff360f7d11f/third_party/WebKit/Source/core/frame/Settings.json5
[modify] https://crrev.com/d252d7b55af16f3edbb90d1132cf6ff360f7d11f/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp
[modify] https://crrev.com/d252d7b55af16f3edbb90d1132cf6ff360f7d11f/third_party/WebKit/Source/web/WebSettingsImpl.cpp
[modify] https://crrev.com/d252d7b55af16f3edbb90d1132cf6ff360f7d11f/third_party/WebKit/Source/web/WebSettingsImpl.h
[modify] https://crrev.com/d252d7b55af16f3edbb90d1132cf6ff360f7d11f/third_party/WebKit/public/web/WebSettings.h

Labels: Merge-Request-57
Project Member

Comment 3 by sheriffbot@chromium.org, Feb 9 2017

Labels: -Merge-Request-57 Hotlist-Merge-Approved Merge-Approved-57
Your change meets the bar and is auto-approved for M57. Please go ahead and merge the CL to branch 2987 manually. Please contact milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), ketakid@(cros), govind@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Please merge your change to M57 branch 2987 before 5:00 PM PT, Friday 02/10 so we can take it in for next week beta release. Thank you.
Project Member

Comment 5 by bugdroid1@chromium.org, Feb 9 2017

Labels: -merge-approved-57 merge-merged-2987
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/60a11504bbae8e3ed2a790668bf7da6e5f1c353b

commit 60a11504bbae8e3ed2a790668bf7da6e5f1c353b
Author: xhwang <xhwang@chromium.org>
Date: Thu Feb 09 19:21:30 2017

media: Add a web preference to enable encrypted media

Add a WebPreference encrypted_media_enabled. If it's set to false, all requestMediaKeySystemAccess() calls will return a rejected promise with NotSupportedError.

Also connect |encrypted_media_enabled| with a new Chrome preference kWebKitEncryptedMediaEnabled and make sure when user changes that preference, the Web preference in the renderer process will get updated.

Note that the check is only done in requestMediaKeySystemAccess(). So if a user disabled the preference after a protected content playback already started, the playback session will not be affected. However, all newer protected content playback attempt will fail.

NOTRY=true
NOPRESUBMIT=true
TBR=tommycli@chromium.org,jam@chromium.org,dcheng@chromium.org,jrummell@chromium.org
BUG= 689778 
TEST=Manually tested.

Review-Url: https://codereview.chromium.org/2676633006
Cr-Commit-Position: refs/heads/master@{#449048}
(cherry picked from commit d252d7b55af16f3edbb90d1132cf6ff360f7d11f)

Review-Url: https://codereview.chromium.org/2681383003
Cr-Commit-Position: refs/branch-heads/2987@{#412}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}

[modify] https://crrev.com/60a11504bbae8e3ed2a790668bf7da6e5f1c353b/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/60a11504bbae8e3ed2a790668bf7da6e5f1c353b/chrome/browser/media/encrypted_media_browsertest.cc
[modify] https://crrev.com/60a11504bbae8e3ed2a790668bf7da6e5f1c353b/chrome/browser/ui/prefs/prefs_tab_helper.cc
[modify] https://crrev.com/60a11504bbae8e3ed2a790668bf7da6e5f1c353b/chrome/common/pref_names.cc
[modify] https://crrev.com/60a11504bbae8e3ed2a790668bf7da6e5f1c353b/chrome/common/pref_names.h
[modify] https://crrev.com/60a11504bbae8e3ed2a790668bf7da6e5f1c353b/content/public/common/common_param_traits_macros.h
[modify] https://crrev.com/60a11504bbae8e3ed2a790668bf7da6e5f1c353b/content/public/common/web_preferences.cc
[modify] https://crrev.com/60a11504bbae8e3ed2a790668bf7da6e5f1c353b/content/public/common/web_preferences.h
[modify] https://crrev.com/60a11504bbae8e3ed2a790668bf7da6e5f1c353b/content/renderer/render_view_impl.cc
[modify] https://crrev.com/60a11504bbae8e3ed2a790668bf7da6e5f1c353b/third_party/WebKit/Source/core/frame/Settings.json5
[modify] https://crrev.com/60a11504bbae8e3ed2a790668bf7da6e5f1c353b/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp
[modify] https://crrev.com/60a11504bbae8e3ed2a790668bf7da6e5f1c353b/third_party/WebKit/Source/web/WebSettingsImpl.cpp
[modify] https://crrev.com/60a11504bbae8e3ed2a790668bf7da6e5f1c353b/third_party/WebKit/Source/web/WebSettingsImpl.h
[modify] https://crrev.com/60a11504bbae8e3ed2a790668bf7da6e5f1c353b/third_party/WebKit/public/web/WebSettings.h

Comment 6 by xhw...@chromium.org, Feb 10 2017

Status: Fixed (was: Started)

Sign in to add a comment