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

Unified Diff: media/blink/webcontentdecryptionmodulesession_impl.cc

Issue 878633004: Add additional UMAs to keep track of unprefixed EME promise results (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 11 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 | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webcontentdecryptionmodulesession_impl.cc
diff --git a/media/blink/webcontentdecryptionmodulesession_impl.cc b/media/blink/webcontentdecryptionmodulesession_impl.cc
index 2cc1e19a1282c0d04af39db7a9f249a91315baff..2fba8d09c1e7448b1e73cbc63ffd783ae281266e 100644
--- a/media/blink/webcontentdecryptionmodulesession_impl.cc
+++ b/media/blink/webcontentdecryptionmodulesession_impl.cc
@@ -24,8 +24,11 @@
namespace media {
-const char kCreateSessionUMAName[] = "CreateSession";
+const char kCloseSessionUMAName[] = "CloseSession";
+const char kGenerateRequestUMAName[] = "GenerateRequest";
const char kLoadSessionUMAName[] = "LoadSession";
+const char kRemoveSessionUMAName[] = "RemoveSession";
+const char kUpdateSessionUMAName[] = "UpdateSession";
// TODO(jrummell): Pass an enum from blink. http://crbug.com/418239.
const char kTemporarySessionType[] = "temporary";
@@ -148,7 +151,7 @@ void WebContentDecryptionModuleSessionImpl::initializeNewSession(
init_data_type_as_ascii, init_data,
base::saturated_cast<int>(init_data_length), session_type_enum,
scoped_ptr<NewSessionCdmPromise>(new NewSessionCdmResultPromise(
- result, adapter_->GetKeySystemUMAPrefix() + kCreateSessionUMAName,
+ result, adapter_->GetKeySystemUMAPrefix() + kGenerateRequestUMAName,
base::Bind(
&WebContentDecryptionModuleSessionImpl::OnSessionInitialized,
base::Unretained(this)))));
@@ -178,26 +181,28 @@ void WebContentDecryptionModuleSessionImpl::update(
blink::WebContentDecryptionModuleResult result) {
DCHECK(response);
DCHECK(!session_id_.empty());
- adapter_->UpdateSession(session_id_, response,
- base::saturated_cast<int>(response_length),
- scoped_ptr<SimpleCdmPromise>(
- new CdmResultPromise<>(result, std::string())));
+ adapter_->UpdateSession(
+ session_id_, response, base::saturated_cast<int>(response_length),
+ scoped_ptr<SimpleCdmPromise>(new CdmResultPromise<>(
+ result, adapter_->GetKeySystemUMAPrefix() + kUpdateSessionUMAName)));
}
void WebContentDecryptionModuleSessionImpl::close(
blink::WebContentDecryptionModuleResult result) {
DCHECK(!session_id_.empty());
- adapter_->CloseSession(session_id_,
- scoped_ptr<SimpleCdmPromise>(
- new CdmResultPromise<>(result, std::string())));
+ adapter_->CloseSession(
+ session_id_,
+ scoped_ptr<SimpleCdmPromise>(new CdmResultPromise<>(
+ result, adapter_->GetKeySystemUMAPrefix() + kCloseSessionUMAName)));
}
void WebContentDecryptionModuleSessionImpl::remove(
blink::WebContentDecryptionModuleResult result) {
DCHECK(!session_id_.empty());
- adapter_->RemoveSession(session_id_,
- scoped_ptr<SimpleCdmPromise>(
- new CdmResultPromise<>(result, std::string())));
+ adapter_->RemoveSession(
+ session_id_,
+ scoped_ptr<SimpleCdmPromise>(new CdmResultPromise<>(
+ result, adapter_->GetKeySystemUMAPrefix() + kRemoveSessionUMAName)));
}
void WebContentDecryptionModuleSessionImpl::release(
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698