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

Unified Diff: content/renderer/media/cdm_session_adapter.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/cdm_session_adapter.cc
diff --git a/content/renderer/media/cdm_session_adapter.cc b/content/renderer/media/cdm_session_adapter.cc
index 9a84d544c9820abc929dad372dbb02ff74b09bdb..de3d162019f87e75aec7ae36ad9030f0e953a717 100644
--- a/content/renderer/media/cdm_session_adapter.cc
+++ b/content/renderer/media/cdm_session_adapter.cc
@@ -9,6 +9,7 @@
#include "base/memory/weak_ptr.h"
#include "base/stl_util.h"
#include "content/renderer/media/crypto/content_decryption_module_factory.h"
+#include "content/renderer/media/crypto/key_systems.h"
#include "content/renderer/media/webcontentdecryptionmodulesession_impl.h"
#include "media/base/cdm_promise.h"
#include "media/base/media_keys.h"
@@ -16,6 +17,9 @@
namespace content {
+const char kMediaEME[] = "Media.EME.";
+const char kDot[] = ".";
+
CdmSessionAdapter::CdmSessionAdapter() :
#if defined(ENABLE_BROWSER_CDMS)
cdm_id_(0),
@@ -32,6 +36,7 @@ bool CdmSessionAdapter::Initialize(
#endif // defined(ENABLE_PEPPER_CDMS)
const std::string& key_system,
const GURL& security_origin) {
+ key_system_uma_prefix_ = kMediaEME + KeySystemNameForUMA(key_system) + kDot;
base::WeakPtr<CdmSessionAdapter> weak_this = weak_ptr_factory_.GetWeakPtr();
media_keys_ = ContentDecryptionModuleFactory::Create(
key_system,
@@ -103,6 +108,10 @@ media::Decryptor* CdmSessionAdapter::GetDecryptor() {
return media_keys_->GetDecryptor();
}
+const std::string& CdmSessionAdapter::GetKeySystemUMAPrefix() const {
+ return key_system_uma_prefix_;
+}
+
#if defined(ENABLE_BROWSER_CDMS)
int CdmSessionAdapter::GetCdmId() const {
return cdm_id_;

Powered by Google App Engine
This is Rietveld 408576698