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

Unified Diff: content/renderer/media/crypto/key_systems.cc

Issue 185993004: Encrypted Media: Confine UUID code to MediaDrmBridge. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed Created 6 years, 9 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 | « content/renderer/media/crypto/key_systems.h ('k') | content/renderer/media/crypto/key_systems_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/crypto/key_systems.cc
diff --git a/content/renderer/media/crypto/key_systems.cc b/content/renderer/media/crypto/key_systems.cc
index 189ef5c27d92f012617aa09a0cbe4f03da5d3065..d3adbe2345e17ae3be615c7b0d1c51b1b2552c3d 100644
--- a/content/renderer/media/crypto/key_systems.cc
+++ b/content/renderer/media/crypto/key_systems.cc
@@ -66,8 +66,6 @@ class KeySystems {
#if defined(ENABLE_PEPPER_CDMS)
std::string GetPepperType(const std::string& concrete_key_system);
-#elif defined(OS_ANDROID)
- std::vector<uint8> GetUUID(const std::string& concrete_key_system);
#endif
private:
@@ -79,13 +77,10 @@ class KeySystems {
bool use_aes_decryptor,
#if defined(ENABLE_PEPPER_CDMS)
const std::string& pepper_type,
-#elif defined(OS_ANDROID)
- const std::vector<uint8>& uuid,
#endif
const std::vector<KeySystemInfo::ContainerCodecsPair>& supported_types,
const std::string& parent_key_system);
-
friend struct base::DefaultLazyInstanceTraits<KeySystems>;
typedef base::hash_set<std::string> CodecSet;
@@ -97,8 +92,6 @@ class KeySystems {
bool use_aes_decryptor;
#if defined(ENABLE_PEPPER_CDMS)
std::string pepper_type;
-#elif defined(OS_ANDROID)
- std::vector<uint8> uuid;
#endif
MimeTypeMap types;
};
@@ -157,8 +150,6 @@ void KeySystems::AddConcreteSupportedKeySystems(
key_system_info.use_aes_decryptor,
#if defined(ENABLE_PEPPER_CDMS)
key_system_info.pepper_type,
-#elif defined(OS_ANDROID)
- key_system_info.uuid,
#endif
key_system_info.supported_types,
key_system_info.parent_key_system);
@@ -170,8 +161,6 @@ void KeySystems::AddConcreteSupportedKeySystem(
bool use_aes_decryptor,
#if defined(ENABLE_PEPPER_CDMS)
const std::string& pepper_type,
-#elif defined(OS_ANDROID)
- const std::vector<uint8>& uuid,
#endif
const std::vector<KeySystemInfo::ContainerCodecsPair>& supported_types,
const std::string& parent_key_system) {
@@ -186,10 +175,6 @@ void KeySystems::AddConcreteSupportedKeySystem(
#if defined(ENABLE_PEPPER_CDMS)
DCHECK_EQ(use_aes_decryptor, pepper_type.empty());
properties.pepper_type = pepper_type;
-#elif defined(OS_ANDROID)
- DCHECK_EQ(use_aes_decryptor, uuid.empty());
- DCHECK(use_aes_decryptor || uuid.size() == 16);
- properties.uuid = uuid;
#endif
for (size_t i = 0; i < supported_types.size(); ++i) {
@@ -320,17 +305,6 @@ std::string KeySystems::GetPepperType(const std::string& concrete_key_system) {
DLOG_IF(FATAL, type.empty()) << concrete_key_system << " is not Pepper-based";
return type;
}
-#elif defined(OS_ANDROID)
-std::vector<uint8> KeySystems::GetUUID(const std::string& concrete_key_system) {
- KeySystemPropertiesMap::iterator key_system_iter =
- concrete_key_system_map_.find(concrete_key_system);
- if (key_system_iter == concrete_key_system_map_.end()) {
- DLOG(FATAL) << concrete_key_system << " is not a known concrete system";
- return std::vector<uint8>();
- }
-
- return key_system_iter->second.uuid;
-}
#endif
//------------------------------------------------------------------------------
@@ -384,10 +358,6 @@ bool CanUseAesDecryptor(const std::string& concrete_key_system) {
std::string GetPepperType(const std::string& concrete_key_system) {
return KeySystems::GetInstance().GetPepperType(concrete_key_system);
}
-#elif defined(OS_ANDROID)
-std::vector<uint8> GetUUID(const std::string& concrete_key_system) {
- return KeySystems::GetInstance().GetUUID(concrete_key_system);
-}
#endif
} // namespace content
« no previous file with comments | « content/renderer/media/crypto/key_systems.h ('k') | content/renderer/media/crypto/key_systems_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698