Chromium Code Reviews| Index: content/renderer/media/crypto/proxy_decryptor.h |
| diff --git a/content/renderer/media/crypto/proxy_decryptor.h b/content/renderer/media/crypto/proxy_decryptor.h |
| index 3ffec5874c575f33abd3751478ca4ba9c77b9c8c..a18574c6f68b50e67e5397e0a2350a8f6146f9d9 100644 |
| --- a/content/renderer/media/crypto/proxy_decryptor.h |
| +++ b/content/renderer/media/crypto/proxy_decryptor.h |
| @@ -35,9 +35,9 @@ class RendererMediaPlayerManager; |
| // A decryptor proxy that creates a real decryptor object on demand and |
| // forwards decryptor calls to it. |
| // |
| -// Now that the Pepper API calls use reference ID to match responses with |
| -// requests, this class maintains a mapping between reference ID and session ID. |
| -// Callers of this class expect session IDs in the responses. |
| +// Now that the Pepper API calls use session ID to match responses with |
| +// requests, this class maintains a mapping between session ID and web session |
| +// ID. Callers of this class expect web session IDs in the responses. |
|
xhwang
2013/12/05 18:51:37
Can you briefly explain what a session ID is and w
jrummell
2013/12/06 23:42:35
Done.
|
| // |
| // TODO(xhwang): Currently we don't support run-time switching among decryptor |
| // objects. Fix this when needed. |
| @@ -45,7 +45,7 @@ class RendererMediaPlayerManager; |
| class ProxyDecryptor { |
| public: |
| // These are similar to the callbacks in media_keys.h, but pass back the |
| - // session ID rather than a reference ID. |
| + // web session ID rather than a session ID. |
|
ddorwin
2013/12/05 00:44:52
s/a/the internal/
jrummell
2013/12/06 23:42:35
Done.
|
| typedef base::Callback<void(const std::string& session_id)> KeyAddedCB; |
| typedef base::Callback<void(const std::string& session_id, |
| media::MediaKeys::KeyError error_code, |
| @@ -86,7 +86,7 @@ class ProxyDecryptor { |
| void CancelKeyRequest(const std::string& session_id); |
| private: |
| - // This is reference_id <-> session_id map. |
| + // This is session_id <-> web_session_id map. |
|
ddorwin
2013/12/05 00:44:52
remove "This is ". (It's missing an article anyway
jrummell
2013/12/06 23:42:35
Done.
|
| typedef std::map<uint32, std::string> SessionIdMap; |
| // Helper function to create MediaKeys to handle the given |key_system|. |
| @@ -94,23 +94,23 @@ class ProxyDecryptor { |
| const GURL& frame_url); |
| // Callbacks for firing session events. |
| - void OnSessionCreated(uint32 reference_id, const std::string& session_id); |
| - void OnSessionMessage(uint32 reference_id, |
| + void OnSessionCreated(uint32 session_id, const std::string& web_session_id); |
| + void OnSessionMessage(uint32 session_id, |
| const std::vector<uint8>& message, |
| const std::string& default_url); |
| - void OnSessionReady(uint32 reference_id); |
| - void OnSessionClosed(uint32 reference_id); |
| - void OnSessionError(uint32 reference_id, |
| + void OnSessionReady(uint32 session_id); |
| + void OnSessionClosed(uint32 session_id); |
| + void OnSessionError(uint32 session_id, |
| media::MediaKeys::KeyError error_code, |
| int system_code); |
| - // Helper function to determine reference_id for the provided |session_id|. |
| - uint32 LookupReferenceId(const std::string& session_id); |
| + // Helper function to determine session_id for the provided |web_session_id|. |
| + uint32 LookupReferenceId(const std::string& web_session_id); |
|
ddorwin
2013/12/05 00:44:52
LookupSessionId
jrummell
2013/12/06 23:42:35
Done.
|
| - // Helper function to determine session_id for the provided |reference_id|. |
| - // The returned session_id is only valid on the main thread, and should be |
| + // Helper function to determine web_session_id for the provided |session_id|. |
| + // The returned web_session_id is only valid on the main thread, and should be |
| // stored by copy. |
| - const std::string& LookupSessionId(uint32 reference_id); |
| + const std::string& LookupSessionId(uint32 session_id); |
|
ddorwin
2013/12/05 00:44:52
Lookup*Web*SessionId
jrummell
2013/12/06 23:42:35
Done.
|
| base::WeakPtrFactory<ProxyDecryptor> weak_ptr_factory_; |
| @@ -141,10 +141,10 @@ class ProxyDecryptor { |
| media::DecryptorReadyCB decryptor_ready_cb_; |
| - // Reference IDs are used to uniquely track sessions so that CDM callbacks |
| - // can get mapped to the correct session ID. Reference ID should be unique |
| + // Session IDs are used to uniquely track sessions so that CDM callbacks |
| + // can get mapped to the correct session ID. Session ID should be unique |
| // per renderer process for debugging purposes. |
| - static uint32 next_reference_id_; |
| + static uint32 next_session_id_; |
| SessionIdMap sessions_; |