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

Side by Side Diff: media/blink/cdm_session_adapter.cc

Issue 2895573002: Reland of Remove ScopedVector from all other codes in media/ (Closed)
Patch Set: Fix the compile fails in build target "jpeg_decode_accelerator_unittest" Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "media/blink/cdm_session_adapter.h" 5 #include "media/blink/cdm_session_adapter.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 void CdmSessionAdapter::OnSessionKeysChange(const std::string& session_id, 192 void CdmSessionAdapter::OnSessionKeysChange(const std::string& session_id,
193 bool has_additional_usable_key, 193 bool has_additional_usable_key,
194 CdmKeysInfo keys_info) { 194 CdmKeysInfo keys_info) {
195 WebContentDecryptionModuleSessionImpl* session = GetSession(session_id); 195 WebContentDecryptionModuleSessionImpl* session = GetSession(session_id);
196 DLOG_IF(WARNING, !session) << __func__ << " for unknown session " 196 DLOG_IF(WARNING, !session) << __func__ << " for unknown session "
197 << session_id; 197 << session_id;
198 if (session) { 198 if (session) {
199 DVLOG(2) << __func__ << ": session_id = " << session_id; 199 DVLOG(2) << __func__ << ": session_id = " << session_id;
200 DVLOG(2) << " - has_additional_usable_key = " << has_additional_usable_key; 200 DVLOG(2) << " - has_additional_usable_key = " << has_additional_usable_key;
201 for (const CdmKeyInformation* info : keys_info) 201 for (const auto& info : keys_info)
202 DVLOG(2) << " - " << *info; 202 DVLOG(2) << " - " << *(info.get());
203 203
204 session->OnSessionKeysChange(has_additional_usable_key, 204 session->OnSessionKeysChange(has_additional_usable_key,
205 std::move(keys_info)); 205 std::move(keys_info));
206 } 206 }
207 } 207 }
208 208
209 void CdmSessionAdapter::OnSessionExpirationUpdate(const std::string& session_id, 209 void CdmSessionAdapter::OnSessionExpirationUpdate(const std::string& session_id,
210 base::Time new_expiry_time) { 210 base::Time new_expiry_time) {
211 WebContentDecryptionModuleSessionImpl* session = GetSession(session_id); 211 WebContentDecryptionModuleSessionImpl* session = GetSession(session_id);
212 DLOG_IF(WARNING, !session) << __func__ << " for unknown session " 212 DLOG_IF(WARNING, !session) << __func__ << " for unknown session "
(...skipping 22 matching lines...) Expand all
235 WebContentDecryptionModuleSessionImpl* CdmSessionAdapter::GetSession( 235 WebContentDecryptionModuleSessionImpl* CdmSessionAdapter::GetSession(
236 const std::string& session_id) { 236 const std::string& session_id) {
237 // Since session objects may get garbage collected, it is possible that there 237 // Since session objects may get garbage collected, it is possible that there
238 // are events coming back from the CDM and the session has been unregistered. 238 // are events coming back from the CDM and the session has been unregistered.
239 // We can not tell if the CDM is firing events at sessions that never existed. 239 // We can not tell if the CDM is firing events at sessions that never existed.
240 SessionMap::iterator session = sessions_.find(session_id); 240 SessionMap::iterator session = sessions_.find(session_id);
241 return (session != sessions_.end()) ? session->second.get() : NULL; 241 return (session != sessions_.end()) ? session->second.get() : NULL;
242 } 242 }
243 243
244 } // namespace media 244 } // namespace media
OLDNEW
« no previous file with comments | « media/base/content_decryption_module.h ('k') | media/blink/webcontentdecryptionmodulesession_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698