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

Unified Diff: chrome/renderer/media/chrome_key_systems.cc

Issue 2582463003: media: Verify CDM Host files (Closed)
Patch Set: comments addressed Created 3 years, 11 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 | « chrome/common/media/cdm_host_file_path.cc ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/media/chrome_key_systems.cc
diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc
index 9df9fd0b579e1adc49a2265af7994b5b1acfe9eb..e27a3da285bab141355af02b2bc76e0d4006c9a4 100644
--- a/chrome/renderer/media/chrome_key_systems.cc
+++ b/chrome/renderer/media/chrome_key_systems.cc
@@ -62,6 +62,8 @@ static bool IsPepperCdmAvailable(
// External Clear Key (used for testing).
static void AddExternalClearKey(
std::vector<std::unique_ptr<KeySystemProperties>>* concrete_key_systems) {
+ // TODO(xhwang): Move these into an array so we can use a for loop to add
+ // supported key systems below.
static const char kExternalClearKeyKeySystem[] =
"org.chromium.externalclearkey";
static const char kExternalClearKeyDecryptOnlyKeySystem[] =
@@ -78,6 +80,8 @@ static void AddExternalClearKey(
"org.chromium.externalclearkey.initializefail";
static const char kExternalClearKeyCrashKeySystem[] =
"org.chromium.externalclearkey.crash";
+ static const char kExternalClearKeyVerifyCdmHostTestKeySystem[] =
+ "org.chromium.externalclearkey.verifycdmhosttest";
std::vector<base::string16> additional_param_names;
std::vector<base::string16> additional_param_values;
@@ -119,6 +123,10 @@ static void AddExternalClearKey(
// A key system that triggers a crash in ClearKeyCdm.
concrete_key_systems->emplace_back(
new cdm::ExternalClearKeyProperties(kExternalClearKeyCrashKeySystem));
+
+ // A key system that triggers the verify host files test in ClearKeyCdm.
+ concrete_key_systems->emplace_back(new cdm::ExternalClearKeyProperties(
+ kExternalClearKeyVerifyCdmHostTestKeySystem));
}
#if defined(WIDEVINE_CDM_AVAILABLE)
« no previous file with comments | « chrome/common/media/cdm_host_file_path.cc ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698