| Index: content/renderer/media/crypto/proxy_decryptor.cc
|
| diff --git a/content/renderer/media/crypto/proxy_decryptor.cc b/content/renderer/media/crypto/proxy_decryptor.cc
|
| index 28cd421e85ff099858007c541c025fd594b92bc0..261b425fec4148665105f55caa35065e1e477775 100644
|
| --- a/content/renderer/media/crypto/proxy_decryptor.cc
|
| +++ b/content/renderer/media/crypto/proxy_decryptor.cc
|
| @@ -230,6 +230,17 @@ void ProxyDecryptor::OnSessionMessage(const std::string& web_session_id,
|
| const std::vector<uint8>& message,
|
| const GURL& destination_url) {
|
| // Assumes that OnSessionCreated() has been called before this.
|
| +
|
| + // For ClearKey, convert the message from JSON into just passing the key
|
| + // as the message. If unable to extract the key, return the message unchanged.
|
| + if (is_clear_key_) {
|
| + std::vector<uint8> key;
|
| + if (media::ExtractLicenseKey(message, key)) {
|
| + key_message_cb_.Run(web_session_id, key, destination_url);
|
| + return;
|
| + }
|
| + }
|
| +
|
| key_message_cb_.Run(web_session_id, message, destination_url);
|
| }
|
|
|
|
|