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

Side by Side Diff: media/cdm/aes_decryptor.h

Issue 105933004: AesDecryptor callbacks now used in a thread-safe manner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: refresh Created 6 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | media/cdm/aes_decryptor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_CRYPTO_AES_DECRYPTOR_H_ 5 #ifndef MEDIA_CRYPTO_AES_DECRYPTOR_H_
6 #define MEDIA_CRYPTO_AES_DECRYPTOR_H_ 6 #define MEDIA_CRYPTO_AES_DECRYPTOR_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // Keeps track of current valid session IDs. 128 // Keeps track of current valid session IDs.
129 std::set<uint32> valid_sessions_; 129 std::set<uint32> valid_sessions_;
130 130
131 // Make web session ID unique per renderer by making it static. Web session 131 // Make web session ID unique per renderer by making it static. Web session
132 // IDs seen by the app will be "1", "2", etc. 132 // IDs seen by the app will be "1", "2", etc.
133 static uint32 next_web_session_id_; 133 static uint32 next_web_session_id_;
134 134
135 NewKeyCB new_audio_key_cb_; 135 NewKeyCB new_audio_key_cb_;
136 NewKeyCB new_video_key_cb_; 136 NewKeyCB new_video_key_cb_;
137 137
138 // Protect |new_audio_key_cb_| and |new_video_key_cb_| as they are set on the
139 // main thread but called on the media thread.
140 mutable base::Lock new_key_cb_lock_;
141
138 DISALLOW_COPY_AND_ASSIGN(AesDecryptor); 142 DISALLOW_COPY_AND_ASSIGN(AesDecryptor);
139 }; 143 };
140 144
141 } // namespace media 145 } // namespace media
142 146
143 #endif // MEDIA_CRYPTO_AES_DECRYPTOR_H_ 147 #endif // MEDIA_CRYPTO_AES_DECRYPTOR_H_
OLDNEW
« no previous file with comments | « no previous file | media/cdm/aes_decryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698