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

Unified Diff: media/crypto/aes_decryptor.cc

Issue 15772012: Separate MediaKeys interface from Decryptor interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android Created 7 years, 7 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 | « media/crypto/aes_decryptor.h ('k') | media/crypto/aes_decryptor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/crypto/aes_decryptor.cc
diff --git a/media/crypto/aes_decryptor.cc b/media/crypto/aes_decryptor.cc
index 29faca0db2b31b5edb17f3b7b3ee933c84cdff46..6402ef0fb2bf30fb43af91bab1eea49b1acdb6cc 100644
--- a/media/crypto/aes_decryptor.cc
+++ b/media/crypto/aes_decryptor.cc
@@ -169,7 +169,7 @@ void AesDecryptor::AddKey(const std::string& key_system,
// https://www.w3.org/Bugs/Public/show_bug.cgi?id=16550
if (key_length != DecryptConfig::kDecryptionKeySize) {
DVLOG(1) << "Invalid key length: " << key_length;
- key_error_cb_.Run(key_system, session_id, Decryptor::kUnknownError, 0);
+ key_error_cb_.Run(key_system, session_id, MediaKeys::kUnknownError, 0);
return;
}
@@ -189,13 +189,13 @@ void AesDecryptor::AddKey(const std::string& key_system,
scoped_ptr<DecryptionKey> decryption_key(new DecryptionKey(key_string));
if (!decryption_key) {
DVLOG(1) << "Could not create key.";
- key_error_cb_.Run(key_system, session_id, Decryptor::kUnknownError, 0);
+ key_error_cb_.Run(key_system, session_id, MediaKeys::kUnknownError, 0);
return;
}
if (!decryption_key->Init()) {
DVLOG(1) << "Could not initialize decryption key.";
- key_error_cb_.Run(key_system, session_id, Decryptor::kUnknownError, 0);
+ key_error_cb_.Run(key_system, session_id, MediaKeys::kUnknownError, 0);
return;
}
@@ -214,6 +214,10 @@ void AesDecryptor::CancelKeyRequest(const std::string& key_system,
const std::string& session_id) {
}
+MediaKeys* AesDecryptor::GetMediaKeys() {
+ return this;
+}
+
void AesDecryptor::RegisterNewKeyCB(StreamType stream_type,
const NewKeyCB& new_key_cb) {
switch (stream_type) {
« no previous file with comments | « media/crypto/aes_decryptor.h ('k') | media/crypto/aes_decryptor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698