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

Unified Diff: third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp

Issue 2652373002: EME: Fail requestMediaKeySystemAccess if no capabilities specified (Closed)
Patch Set: more changes Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7f0f6e7b1bf1a52df98f99dbb24308068ca00c24..72795ee8ca2fb5d230211bb51b4460807e83aeaf 100644
--- a/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp
+++ b/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp
@@ -130,12 +130,6 @@ class MediaKeySystemAccessInitializer final : public EncryptedMediaRequest {
// See http://crbug.com/605661.
void checkEmptyCodecs(const WebMediaKeySystemConfiguration&);
- // Log UseCounter if selected configuration does not have at least one of
- // 'audioCapabilities' and 'videoCapabilities' non-empty.
- // TODO(jrummell): Switch to deprecation message once we have data.
- // See http://crbug.com/616233.
- void checkCapabilities(const WebMediaKeySystemConfiguration&);
-
Member<ScriptPromiseResolver> m_resolver;
const String m_keySystem;
WebVector<WebMediaKeySystemConfiguration> m_supportedConfigurations;
@@ -202,7 +196,6 @@ SecurityOrigin* MediaKeySystemAccessInitializer::getSecurityOrigin() const {
void MediaKeySystemAccessInitializer::requestSucceeded(
WebContentDecryptionModuleAccess* access) {
checkEmptyCodecs(access->getConfiguration());
- checkCapabilities(access->getConfiguration());
if (!isExecutionContextValid())
return;
@@ -302,24 +295,6 @@ void MediaKeySystemAccessInitializer::checkEmptyCodecs(
}
}
-void MediaKeySystemAccessInitializer::checkCapabilities(
- const WebMediaKeySystemConfiguration& config) {
- // This is only checking that at least one capability is provided in the
- // selected configuration, as apps may pass empty capabilities for
- // compatibility with other implementations.
- bool atLeastOneAudioCapability = config.audioCapabilities.size() > 0;
- bool atLeastOneVideoCapability = config.videoCapabilities.size() > 0;
-
- if (atLeastOneAudioCapability || atLeastOneVideoCapability) {
- UseCounter::count(m_resolver->getExecutionContext(),
- UseCounter::EncryptedMediaCapabilityProvided);
- } else {
- Deprecation::countDeprecation(
- m_resolver->getExecutionContext(),
- UseCounter::EncryptedMediaCapabilityNotProvided);
- }
-}
-
} // namespace
ScriptPromise NavigatorRequestMediaKeySystemAccess::requestMediaKeySystemAccess(
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698