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

Unified Diff: media/base/key_systems.cc

Issue 2445433003: media: Enable encrypted media content browsertests when MojoCdm is used (Closed)
Patch Set: media: Enable encrypted media content browsertests when MojoCdm is used 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
Index: media/base/key_systems.cc
diff --git a/media/base/key_systems.cc b/media/base/key_systems.cc
index f71dae2f18c93cac2395f7b9590693bf63eb4ff4..66d40bf16b76c5d1066353eea79e2be91d3d0da0 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 "media/base/media_switches.h"
#include "ppapi/features/features.h"
#include "media/base/media_client.h"
#include "third_party/widevine/cdm/widevine_cdm_common.h"
@@ -404,17 +405,19 @@ void KeySystemsImpl::AddSupportedKeySystems(
// other platforms assume the CDM can and will do anything, except for the
// following two cases:
// 1) AES decryptor, and
- // 2) External Clear Key key system on Android, only enabled for testing.
+ // 2) External Clear Key key system when MojoCdm is used, only enabled for
+ // testing.
bool can_block = properties->UseAesDecryptor();
#if BUILDFLAG(ENABLE_PEPPER_CDMS)
DCHECK_EQ(properties->UseAesDecryptor(),
properties->GetPepperType().empty());
if (!properties->GetPepperType().empty())
can_block = true;
-#elif defined(OS_ANDROID)
- if (IsExternalClearKey(properties->GetKeySystemName()))
- can_block = true;
#endif
+ if (base::FeatureList::IsEnabled(media::kExternalClearKeyForTesting) &&
ddorwin 2016/10/28 19:03:47 Does this work with ENABLE_PEPPER_CDMS? Do we expe
xhwang 2016/11/03 07:14:44 In browser_tests we do set kExternalClearKeyForTes
ddorwin 2016/11/10 01:24:29 The code is inconsistent with the comment, which s
xhwang 2016/11/10 07:11:28 Done.
+ IsExternalClearKey(properties->GetKeySystemName()))
+ can_block = true;
+
if (!can_block) {
DCHECK(properties->GetDistinctiveIdentifierSupport() ==
EmeFeatureSupport::ALWAYS_ENABLED);

Powered by Google App Engine
This is Rietveld 408576698