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

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

Issue 1712903002: Remove prefixed EME. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix isRenewalMessage() in browser tests. Created 4 years, 10 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 | « media/blink/BUILD.gn ('k') | media/blink/encrypted_media_player_support.h » ('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 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 if (session) 205 if (session)
206 session->OnSessionClosed(); 206 session->OnSessionClosed();
207 } 207 }
208 208
209 void CdmSessionAdapter::OnLegacySessionError( 209 void CdmSessionAdapter::OnLegacySessionError(
210 const std::string& session_id, 210 const std::string& session_id,
211 MediaKeys::Exception exception_code, 211 MediaKeys::Exception exception_code,
212 uint32_t system_code, 212 uint32_t system_code,
213 const std::string& error_message) { 213 const std::string& error_message) {
214 // Error events not used by unprefixed EME. 214 // Error events not used by unprefixed EME.
215 // TODO(jrummell): Remove when prefixed EME removed. 215 // TODO(jrummell): Remove when prefixed EME removed. https://crbug.com/249976
216 } 216 }
217 217
218 WebContentDecryptionModuleSessionImpl* CdmSessionAdapter::GetSession( 218 WebContentDecryptionModuleSessionImpl* CdmSessionAdapter::GetSession(
219 const std::string& session_id) { 219 const std::string& session_id) {
220 // Since session objects may get garbage collected, it is possible that there 220 // Since session objects may get garbage collected, it is possible that there
221 // are events coming back from the CDM and the session has been unregistered. 221 // are events coming back from the CDM and the session has been unregistered.
222 // We can not tell if the CDM is firing events at sessions that never existed. 222 // We can not tell if the CDM is firing events at sessions that never existed.
223 SessionMap::iterator session = sessions_.find(session_id); 223 SessionMap::iterator session = sessions_.find(session_id);
224 return (session != sessions_.end()) ? session->second.get() : NULL; 224 return (session != sessions_.end()) ? session->second.get() : NULL;
225 } 225 }
226 226
227 void CdmSessionAdapter::ReportTimeToCreateCdmUMA(base::TimeDelta time) const { 227 void CdmSessionAdapter::ReportTimeToCreateCdmUMA(base::TimeDelta time) const {
228 // Note: This leaks memory, which is expected behavior. 228 // Note: This leaks memory, which is expected behavior.
229 base::HistogramBase* histogram = base::Histogram::FactoryTimeGet( 229 base::HistogramBase* histogram = base::Histogram::FactoryTimeGet(
230 GetKeySystemUMAPrefix() + kTimeToCreateCdmUMAName, 230 GetKeySystemUMAPrefix() + kTimeToCreateCdmUMAName,
231 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromSeconds(10), 231 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromSeconds(10),
232 50, base::HistogramBase::kUmaTargetedHistogramFlag); 232 50, base::HistogramBase::kUmaTargetedHistogramFlag);
233 233
234 histogram->AddTime(time); 234 histogram->AddTime(time);
235 } 235 }
236 236
237 } // namespace media 237 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/BUILD.gn ('k') | media/blink/encrypted_media_player_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698