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

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: rebase Created 6 years, 4 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 | « content/renderer/media/crypto/proxy_decryptor.cc ('k') | media/cdm/aes_decryptor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cdm/aes_decryptor.cc
diff --git a/media/cdm/aes_decryptor.cc b/media/cdm/aes_decryptor.cc
index daafb1e88d1916e3c4f395e625b98ec323cb8773..b83c9b185d52226737c8437fb63e1d81e0ac1926 100644
--- a/media/cdm/aes_decryptor.cc
+++ b/media/cdm/aes_decryptor.cc
@@ -245,11 +245,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.
// 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);
@@ -280,7 +280,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;
« no previous file with comments | « content/renderer/media/crypto/proxy_decryptor.cc ('k') | media/cdm/aes_decryptor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698