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

Unified Diff: media/blink/cdm_session_adapter.h

Issue 1241263002: media: Add UMA and trace events for CDM creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 5 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/blink/cdm_session_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/cdm_session_adapter.h
diff --git a/media/blink/cdm_session_adapter.h b/media/blink/cdm_session_adapter.h
index d70e801ab9c69323d93d2bec1784488ddbf10033..192061410579c997250d49e59d4cf8919e2b7f4e 100644
--- a/media/blink/cdm_session_adapter.h
+++ b/media/blink/cdm_session_adapter.h
@@ -110,6 +110,7 @@ class CdmSessionAdapter : public base::RefCounted<CdmSessionAdapter> {
// Callback for CreateCdm().
void OnCdmCreated(const std::string& key_system,
+ base::TimeTicks start_time,
blink::WebContentDecryptionModuleResult result,
scoped_ptr<MediaKeys> cdm,
const std::string& error_message);
@@ -134,6 +135,8 @@ class CdmSessionAdapter : public base::RefCounted<CdmSessionAdapter> {
WebContentDecryptionModuleSessionImpl* GetSession(
const std::string& session_id);
+ void ReportTimeToCreateCdmUMA(base::TimeDelta cdm_creation_time) const;
+
scoped_ptr<MediaKeys> cdm_;
SessionMap sessions_;
@@ -141,6 +144,10 @@ class CdmSessionAdapter : public base::RefCounted<CdmSessionAdapter> {
std::string key_system_;
std::string key_system_uma_prefix_;
+ // A unique ID to trace CdmSessionAdapter::CreateCdm() call and the matching
+ // OnCdmCreated() call.
+ uint32 trace_id_;
+
// NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<CdmSessionAdapter> weak_ptr_factory_;
« no previous file with comments | « no previous file | media/blink/cdm_session_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698