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

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

Issue 923283002: Implement checks for distinctiveIdentifier and persistentState in requestMediaKeySystemAccess(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cast Widevine config Created 5 years, 10 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 | chromecast/renderer/key_systems_cast.cc » ('j') | chromecast/renderer/key_systems_cast.cc » ('J')
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 db388eacf9e9486919a00ec3dba99be53e3cd5ac..b5e04152663070ee5343f4f14c3215d426931344 100644
--- a/chrome/renderer/media/chrome_key_systems.cc
+++ b/chrome/renderer/media/chrome_key_systems.cc
@@ -72,7 +72,8 @@ static void AddExternalClearKey(
return;
}
- KeySystemInfo info(kExternalClearKeyKeySystem);
+ KeySystemInfo info;
+ info.key_system = kExternalClearKeyKeySystem;
info.supported_codecs = media::EME_CODEC_WEBM_ALL;
info.supported_init_data_types = media::EME_INIT_DATA_TYPE_WEBM;
@@ -81,6 +82,13 @@ static void AddExternalClearKey(
info.supported_init_data_types |= media::EME_INIT_DATA_TYPE_CENC;
#endif // defined(USE_PROPRIETARY_CODECS)
+ // Persistent sessions are faked.
+ info.persistent_license_support = media::EME_SESSION_TYPE_SUPPORTED;
+ info.persistent_release_message_support =
+ media::EME_SESSION_TYPE_NOT_SUPPORTED;
+ info.persistent_state_support = media::EME_FEATURE_SUPPORTED;
+ info.distinctive_identifier_support = media::EME_FEATURE_NOT_SUPPORTED;
+
info.pepper_type = kExternalClearKeyPepperType;
concrete_key_systems->push_back(info);
@@ -178,9 +186,27 @@ static void AddPepperBasedWidevine(
#endif // defined(USE_PROPRIETARY_CODECS)
}
- cdm::AddWidevineWithCodecs(cdm::WIDEVINE,
- supported_codecs,
- concrete_key_systems);
+ cdm::AddWidevineWithCodecs(
+ cdm::WIDEVINE,
+ supported_codecs,
+#if defined(OS_CHROMEOS)
+ // Persistent licenses are supported if remote attestatin succeeds.
ddorwin 2015/02/19 01:41:33 attestation
sandersd (OOO until July 31) 2015/02/19 21:08:33 Done.
+ media::EME_SESSION_TYPE_SUPPORTED_WITH_PERMISSION,
+ media::EME_SESSION_TYPE_NOT_SUPPORTED, // Persistent release message.
+ media::EME_FEATURE_SUPPORTED, // Persistent state.
+ // A distinctive identifier will be available if remote attestation
+ // succeeds.
+ // TODO(sandersd): Using ALWAYS_AVAILABLE prevents "not-allowed" from
+ // succeeding. Change this to SUPPORTED_WITH_PERMISSION once the
+ // distinctive identifier can be blocked. http://crbug.com/457482
+ media::EME_FEATURE_ALWAYS_AVAILABLE,
+#else // (Desktop)
+ media::EME_SESSION_TYPE_NOT_SUPPORTED, // Persistent license.
+ media::EME_SESSION_TYPE_NOT_SUPPORTED, // Persistent release message.
+ media::EME_FEATURE_SUPPORTED, // Persistent state.
+ media::EME_FEATURE_NOT_SUPPORTED, // Distinctive identifier.
+#endif // defined(OS_CHROMEOS)
+ concrete_key_systems);
}
#endif // defined(WIDEVINE_CDM_AVAILABLE)
#endif // defined(ENABLE_PEPPER_CDMS)
« no previous file with comments | « no previous file | chromecast/renderer/key_systems_cast.cc » ('j') | chromecast/renderer/key_systems_cast.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698