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

Unified Diff: media/base/key_systems.cc

Issue 1910283003: EME: Check for invalid Key System names on addition (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Slightly improve comment Created 4 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/key_systems.cc
diff --git a/media/base/key_systems.cc b/media/base/key_systems.cc
index 675df7b3960760978597bb32a6a92d89e245066f..fab743252d9f227af048d2fae5b6f52c493b4548 100644
--- a/media/base/key_systems.cc
+++ b/media/base/key_systems.cc
@@ -377,6 +377,13 @@ void KeySystemsImpl::AddSupportedKeySystems(
DCHECK(properties->GetDistinctiveIdentifierSupport() !=
EmeFeatureSupport::INVALID);
+ if (!IsPotentiallySupportedKeySystem(properties->GetKeySystemName())) {
+ // If you encounter this path, see the comments for the function above.
+ DLOG(ERROR) << "Unsupported name '" << properties->GetKeySystemName()
+ << "'. See code comments.";
+ continue;
+ }
+
// Supporting persistent state is a prerequsite for supporting persistent
// sessions.
if (properties->GetPersistentStateSupport() ==
@@ -547,15 +554,6 @@ bool KeySystemsImpl::IsSupportedKeySystem(const std::string& key_system) const {
if (!key_system_properties_map_.count(key_system))
return false;
- // TODO(ddorwin): Move this to where we add key systems when prefixed EME is
- // removed (crbug.com/249976).
- if (!IsPotentiallySupportedKeySystem(key_system)) {
- // If you encounter this path, see the comments for the above function.
- DLOG(ERROR) << "Unrecognized key system " << key_system
- << ". See code comments.";
- return false;
- }
-
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698