| 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 05026803c9f3ea8b88304860714a84916f166861..8a9a757a9046c9150d95f7579429edfbd0e08d2f 100644
|
| --- a/content/renderer/media/crypto/proxy_decryptor.cc
|
| +++ b/content/renderer/media/crypto/proxy_decryptor.cc
|
| @@ -247,6 +247,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::ExtractFirstKeyIdFromLicenseRequest(message, &key)) {
|
| + key_message_cb_.Run(web_session_id, key, destination_url);
|
| + return;
|
| + }
|
| + }
|
| +
|
| key_message_cb_.Run(web_session_id, message, destination_url);
|
| }
|
|
|
|
|