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

Unified Diff: media/cdm/ppapi/external_clear_key/clear_key_cdm.cc

Issue 2426813002: EME: Close existing sessions on CDM failure (Closed)
Patch Set: add new tests Created 4 years, 1 month 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/cdm/ppapi/external_clear_key/clear_key_cdm.cc
diff --git a/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc b/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc
index aaf7c221609c4bb5d63e783b5e1d9720e3a182cc..7c823d292dd020f4ce820642cdfb74135b6c0dce 100644
--- a/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc
+++ b/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc
@@ -72,6 +72,8 @@ const char kExternalClearKeyPlatformVerificationTestKeySystem[] =
"org.chromium.externalclearkey.platformverificationtest";
const char kExternalClearKeyCrashKeySystem[] =
"org.chromium.externalclearkey.crash";
+const char kExternalClearKeyCloseOnCrashKeySystem[] =
+ "org.chromium.externalclearkey.closeoncrash";
// Constants for the enumalted session that can be loaded by LoadSession().
// These constants need to be in sync with
@@ -242,7 +244,8 @@ void* CreateCdmInstance(int cdm_interface_version,
key_system_string != kExternalClearKeyFileIOTestKeySystem &&
key_system_string != kExternalClearKeyOutputProtectionTestKeySystem &&
key_system_string != kExternalClearKeyPlatformVerificationTestKeySystem &&
- key_system_string != kExternalClearKeyCrashKeySystem) {
+ key_system_string != kExternalClearKeyCrashKeySystem &&
+ key_system_string != kExternalClearKeyCloseOnCrashKeySystem) {
xhwang 2016/11/04 22:37:40 Last time when I was here I thought maybe we shoul
jrummell 2016/11/07 22:03:47 No longer adding a key system so this is reverted
DVLOG(1) << "Unsupported key system:" << key_system_string;
return NULL;
}
@@ -622,7 +625,8 @@ cdm::Status ClearKeyCdm::DecryptAndDecodeSamples(
DVLOG(1) << "DecryptAndDecodeSamples()";
// Trigger a crash on purpose for testing purpose.
- if (key_system_ == kExternalClearKeyCrashKeySystem)
+ if (key_system_ == kExternalClearKeyCrashKeySystem ||
+ key_system_ == kExternalClearKeyCloseOnCrashKeySystem)
xhwang 2016/11/04 22:37:40 It seems odd that two tests execute exactly the sa
jrummell 2016/11/07 22:03:47 Done.
CHECK(false);
scoped_refptr<media::DecoderBuffer> buffer;

Powered by Google App Engine
This is Rietveld 408576698