Chromium Code Reviews| 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; |