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

Unified Diff: media/base/key_systems.cc

Issue 2409423002: Move ENABLE_PEPPER_CDMS to a buildflag header. (Closed)
Patch Set: Fix and format Created 4 years, 2 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_systems.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 c2eb7f163076d82dd03b7ff2ca3255f7f9103e32..f71dae2f18c93cac2395f7b9590693bf63eb4ff4 100644
--- a/media/base/key_systems.cc
+++ b/media/base/key_systems.cc
@@ -19,6 +19,7 @@
#include "media/base/key_system_names.h"
#include "media/base/key_system_properties.h"
#include "media/base/media.h"
+#include "ppapi/features/features.h"
#include "media/base/media_client.h"
#include "third_party/widevine/cdm/widevine_cdm_common.h"
@@ -173,7 +174,7 @@ class KeySystemsImpl : public KeySystems {
bool UseAesDecryptor(const std::string& key_system) const;
-#if defined(ENABLE_PEPPER_CDMS)
+#if BUILDFLAG(ENABLE_PEPPER_CDMS)
std::string GetPepperType(const std::string& key_system) const;
#endif
@@ -405,7 +406,7 @@ void KeySystemsImpl::AddSupportedKeySystems(
// 1) AES decryptor, and
// 2) External Clear Key key system on Android, only enabled for testing.
bool can_block = properties->UseAesDecryptor();
-#if defined(ENABLE_PEPPER_CDMS)
+#if BUILDFLAG(ENABLE_PEPPER_CDMS)
DCHECK_EQ(properties->UseAesDecryptor(),
properties->GetPepperType().empty());
if (!properties->GetPepperType().empty())
@@ -506,7 +507,7 @@ bool KeySystemsImpl::UseAesDecryptor(const std::string& key_system) const {
return key_system_iter->second->UseAesDecryptor();
}
-#if defined(ENABLE_PEPPER_CDMS)
+#if BUILDFLAG(ENABLE_PEPPER_CDMS)
std::string KeySystemsImpl::GetPepperType(const std::string& key_system) const {
DCHECK(thread_checker_.CalledOnValidThread());
@@ -705,7 +706,7 @@ bool CanUseAesDecryptor(const std::string& key_system) {
return KeySystemsImpl::GetInstance()->UseAesDecryptor(key_system);
}
-#if defined(ENABLE_PEPPER_CDMS)
+#if BUILDFLAG(ENABLE_PEPPER_CDMS)
std::string GetPepperType(const std::string& key_system) {
return KeySystemsImpl::GetInstance()->GetPepperType(key_system);
}
« no previous file with comments | « media/base/key_systems.h ('k') | media/base/key_systems_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698