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

Unified Diff: content/renderer/media/webcontentdecryptionmodulesession_impl.cc

Issue 452643002: Add UMA reporting to CdmPromise. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 6 years, 4 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
Index: content/renderer/media/webcontentdecryptionmodulesession_impl.cc
diff --git a/content/renderer/media/webcontentdecryptionmodulesession_impl.cc b/content/renderer/media/webcontentdecryptionmodulesession_impl.cc
index 65975186a5f7185310f928fec0ef84dfc9331d61..a24d12b75988cde818166abfc2f777ae49059ca1 100644
--- a/content/renderer/media/webcontentdecryptionmodulesession_impl.cc
+++ b/content/renderer/media/webcontentdecryptionmodulesession_impl.cc
@@ -15,6 +15,8 @@
namespace content {
+const char kCreateSessionUMAName[] = "CreateSession";
+
// For backwards compatibility with blink not using
// WebContentDecryptionModuleResult, reserve an index for |outstanding_results_|
// that will not be used when adding a WebContentDecryptionModuleResult.
@@ -107,7 +109,8 @@ void WebContentDecryptionModuleSessionImpl::initializeNewSession(
weak_ptr_factory_.GetWeakPtr(),
kReservedIndex),
base::Bind(&WebContentDecryptionModuleSessionImpl::OnSessionError,
- weak_ptr_factory_.GetWeakPtr())));
+ weak_ptr_factory_.GetWeakPtr()),
+ adapter_->GetKeySystemUMAPrefix() + kCreateSessionUMAName));
adapter_->InitializeNewSession(init_data_type_as_ascii,
init_data,
init_data_length,
@@ -168,7 +171,8 @@ void WebContentDecryptionModuleSessionImpl::initializeNewSession(
result_index),
base::Bind(&WebContentDecryptionModuleSessionImpl::SessionError,
weak_ptr_factory_.GetWeakPtr(),
- result_index)));
+ result_index),
+ adapter_->GetKeySystemUMAPrefix() + kCreateSessionUMAName));
adapter_->InitializeNewSession(init_data_type_as_ascii,
init_data,
init_data_length,

Powered by Google App Engine
This is Rietveld 408576698