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

Unified Diff: media/crypto/aes_decryptor.h

Issue 10822013: Code clean-up in AesDecryptor and test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | « no previous file | media/crypto/aes_decryptor.cc » ('j') | media/crypto/aes_decryptor.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « no previous file | media/crypto/aes_decryptor.cc » ('j') | media/crypto/aes_decryptor.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698