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

Unified Diff: media/base/key_systems.cc

Issue 1732423002: EME: Remove the concept of a parent key system. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ks
Patch Set: Add test per review. Created 4 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 | « media/base/key_system_info.h ('k') | media/base/key_systems_unittest.cc » ('j') | 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 a4da6d5b872ec47cbb8fe7cb40c928503d245516..105c019933ec3ee469621f687ce6fe168b098f99 100644
--- a/media/base/key_systems.cc
+++ b/media/base/key_systems.cc
@@ -153,7 +153,7 @@ static bool IsPotentiallySupportedKeySystem(const std::string& key_system) {
// Chromecast defines behaviors for Cast clients within its reverse domain.
const char kChromecastRoot[] = "com.chromecast";
- if (IsParentKeySystemOf(kChromecastRoot, key_system))
+ if (IsChildKeySystemOf(key_system, kChromecastRoot))
return true;
// Implementations that do not have a specification or appropriate glue code
@@ -235,7 +235,6 @@ class KeySystemsImpl : public KeySystems {
friend struct base::DefaultLazyInstanceTraits<KeySystemsImpl>;
typedef base::hash_map<std::string, KeySystemInfo> KeySystemInfoMap;
- typedef base::hash_map<std::string, std::string> ParentKeySystemMap;
typedef base::hash_map<std::string, SupportedCodecs> MimeTypeCodecsMap;
typedef base::hash_map<std::string, EmeCodec> CodecsMap;
typedef base::hash_map<std::string, EmeInitDataType> InitDataTypesMap;
@@ -251,10 +250,6 @@ class KeySystemsImpl : public KeySystems {
// Map from key system string to capabilities.
KeySystemInfoMap concrete_key_system_map_;
- // Map from parent key system to the concrete key system that should be used
- // to represent its capabilities.
- ParentKeySystemMap parent_key_system_map_;
-
// This member should only be modified by RegisterMimeType().
MimeTypeCodecsMap mime_type_to_codec_mask_map_;
CodecsMap codec_string_map_;
@@ -346,7 +341,6 @@ void KeySystemsImpl::UpdateIfNeeded() {
void KeySystemsImpl::UpdateSupportedKeySystems() {
DCHECK(thread_checker_.CalledOnValidThread());
concrete_key_system_map_.clear();
- parent_key_system_map_.clear();
// Build KeySystemInfo.
std::vector<KeySystemInfo> key_systems_info;
@@ -365,7 +359,6 @@ void KeySystemsImpl::AddConcreteSupportedKeySystems(
const std::vector<KeySystemInfo>& concrete_key_systems) {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(concrete_key_system_map_.empty());
- DCHECK(parent_key_system_map_.empty());
for (const KeySystemInfo& info : concrete_key_systems) {
DCHECK(!info.key_system.empty());
@@ -420,17 +413,7 @@ void KeySystemsImpl::AddConcreteSupportedKeySystems(
DCHECK(!IsConcreteSupportedKeySystem(info.key_system))
<< "Key system '" << info.key_system << "' already registered";
- DCHECK(!parent_key_system_map_.count(info.key_system))
- << "'" << info.key_system << "' is already registered as a parent";
concrete_key_system_map_[info.key_system] = info;
- if (!info.parent_key_system.empty()) {
- DCHECK(!IsConcreteSupportedKeySystem(info.parent_key_system))
- << "Parent '" << info.parent_key_system << "' "
- << "already registered concrete";
- DCHECK(!parent_key_system_map_.count(info.parent_key_system))
- << "Parent '" << info.parent_key_system << "' already registered";
- parent_key_system_map_[info.parent_key_system] = info.key_system;
- }
}
}
« no previous file with comments | « media/base/key_system_info.h ('k') | media/base/key_systems_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698