Index: media/crypto/aes_decryptor.h |
diff --git a/media/crypto/aes_decryptor.h b/media/crypto/aes_decryptor.h |
index 224035cfe76eefa316365c8e127c3f5b00031472..b9db003aab3726b8c15a579097d3fb0ce377ed99 100644 |
--- a/media/crypto/aes_decryptor.h |
+++ b/media/crypto/aes_decryptor.h |
@@ -86,6 +86,9 @@ class MEDIA_EXPORT AesDecryptor : public Decryptor { |
DISALLOW_COPY_AND_ASSIGN(DecryptionKey); |
}; |
+ void SetKey(const std::string& key_id, scoped_ptr<DecryptionKey> key); |
ddorwin
2012/07/26 21:24:07
Should note that this object takes ownership of ke
xhwang
2012/07/26 23:36:47
Since scopted_ptr<> is move only, by passing in a
|
+ DecryptionKey* GetKey(const std::string& key_id) const; |
ddorwin
2012/07/26 21:24:07
Who owns the key? If it's not a copy, should that
xhwang
2012/07/26 23:36:47
Added a comment that the AesDecryptor still owns t
|
+ |
// KeyMap owns the DecryptionKey* and must delete them when they are |
// not needed any more. |
typedef base::hash_map<std::string, DecryptionKey*> KeyMap; |
@@ -94,7 +97,7 @@ class MEDIA_EXPORT AesDecryptor : public Decryptor { |
// protect |key_map_|, the only member variable that is shared between |
// Decrypt() and other methods. |
KeyMap key_map_; // Protected by the |key_map_lock_|. |
- base::Lock key_map_lock_; // Protects the |key_map_|. |
+ mutable base::Lock key_map_lock_; // Protects the |key_map_|. |
// Make session ID unique per renderer by making it static. |
// TODO(xhwang): Make session ID more strictly defined if needed: |