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

Unified Diff: media/cdm/aes_decryptor.cc

Issue 427993002: Implement ClearKey message format as JSON. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updates Created 6 years, 5 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/cdm/aes_decryptor.cc
diff --git a/media/cdm/aes_decryptor.cc b/media/cdm/aes_decryptor.cc
index 3530c3e9de01db991588ba6c93c3f7aa12d0fdd0..a5c37f0ad48c744a2514a72df5bd7f922d70858f 100644
--- a/media/cdm/aes_decryptor.cc
+++ b/media/cdm/aes_decryptor.cc
@@ -241,11 +241,11 @@ void AesDecryptor::CreateSession(const std::string& init_data_type,
// For now, the AesDecryptor does not care about |init_data_type| or
// |session_type|; just resolve the promise and then fire a message event
- // with the |init_data| as the request.
+ // using the |init_data| as the key id in the license request.
xhwang 2014/08/08 20:31:12 nit: s/id/ID
jrummell 2014/08/09 00:14:17 Done.
// TODO(jrummell): Validate |init_data_type| and |session_type|.
std::vector<uint8> message;
if (init_data && init_data_length)
- message.assign(init_data, init_data + init_data_length);
+ CreateLicenseRequest(init_data, init_data_length, session_type, &message);
promise->resolve(web_session_id);
@@ -276,7 +276,8 @@ void AesDecryptor::UpdateSession(const std::string& web_session_id,
response_length);
KeyIdAndKeyPairs keys;
- if (!ExtractKeysFromJWKSet(key_string, &keys)) {
+ SessionType session_type = MediaKeys::TEMPORARY_SESSION;
+ if (!ExtractKeysFromJWKSet(key_string, &keys, &session_type)) {
promise->reject(
INVALID_ACCESS_ERROR, 0, "response is not a valid JSON Web Key Set.");
return;

Powered by Google App Engine
This is Rietveld 408576698