| Index: third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp
|
| diff --git a/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp b/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp
|
| index 5fceee8b952698482f3d800676b45d95a08a27e7..1dee6dab1de4e873acbb3c290398994b5a5ee879 100644
|
| --- a/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp
|
| +++ b/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp
|
| @@ -278,9 +278,20 @@ ScriptPromise NavigatorRequestMediaKeySystemAccess::requestMediaKeySystemAccess(
|
| //
|
| // Do not check settings for Clear Key.
|
| if (key_system != "org.w3.clearkey") {
|
| - // For other key systems, check settings.
|
| - if (!document->GetSettings() ||
|
| - !document->GetSettings()->GetEncryptedMediaEnabled()) {
|
| + // For other key systems, check settings and report UMA.
|
| + bool encypted_media_enabled =
|
| + document->GetSettings() &&
|
| + document->GetSettings()->GetEncryptedMediaEnabled();
|
| +
|
| + static bool has_reported_uma = false;
|
| + if (!has_reported_uma) {
|
| + has_reported_uma = true;
|
| + DEFINE_STATIC_LOCAL(BooleanHistogram, histogram,
|
| + ("Media.EME.EncryptedMediaEnabled"));
|
| + histogram.Count(encypted_media_enabled);
|
| + }
|
| +
|
| + if (!encypted_media_enabled) {
|
| return ScriptPromise::RejectWithDOMException(
|
| script_state,
|
| DOMException::Create(kNotSupportedError, "Unsupported keySystem"));
|
|
|