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

Unified Diff: media/blink/key_system_config_selector.cc

Issue 2414983002: EME: Fail if unsupported sessionTypes are provided (Closed)
Patch Set: 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 | « no previous file | third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-requestmediakeysystemaccess.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/key_system_config_selector.cc
diff --git a/media/blink/key_system_config_selector.cc b/media/blink/key_system_config_selector.cc
index bbd7c312b891dede94244a183f94c32d68202ab5..dea69d9051e95be5e0010aff212cba7749daf27e 100644
--- a/media/blink/key_system_config_selector.cc
+++ b/media/blink/key_system_config_selector.cc
@@ -586,6 +586,11 @@ KeySystemConfigSelector::GetSupportedConfiguration(
for (size_t i = 0; i < session_types.size(); i++) {
// 13.1. Let session type be the value.
blink::WebEncryptedMediaSessionType session_type = session_types[i];
+ if (session_type == blink::WebEncryptedMediaSessionType::Unknown) {
+ DVLOG(2) << "Rejecting requested configuration because "
+ << "session type was not recognized.";
+ return CONFIGURATION_NOT_SUPPORTED;
+ }
// 13.2. If accumulated configuration's persistentState value is
// "not-allowed" and the Is persistent session type? algorithm
@@ -604,8 +609,7 @@ KeySystemConfigSelector::GetSupportedConfiguration(
EmeConfigRule session_type_rule = EmeConfigRule::NOT_SUPPORTED;
switch (session_type) {
case blink::WebEncryptedMediaSessionType::Unknown:
- DVLOG(2) << "Rejecting requested configuration because "
- << "a required session type was not recognized.";
+ NOTREACHED();
return CONFIGURATION_NOT_SUPPORTED;
case blink::WebEncryptedMediaSessionType::Temporary:
session_type_rule = EmeConfigRule::SUPPORTED;
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-requestmediakeysystemaccess.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698