Fixes missing or broken metrics in Widevine CDM

A few metrics were missing or not properly collected in the CDM metrics.
This CL addresses them.

Bug: 64570194
Bug: 72866232

Test: Unit tests and Google Play manual test.
Change-Id: I3a3aa4fb3eb8422c9c8c398016f02409307beb33
This commit is contained in:
Adam Stone
2018-03-14 15:20:03 -07:00
parent b19f0d106f
commit e1fe90372f
10 changed files with 157 additions and 61 deletions

View File

@@ -2093,6 +2093,7 @@ CdmResponseType CryptoSession::UpdateUsageEntry(
size_t usage_entry_len = 0;
OEMCryptoResult result = OEMCrypto_UpdateUsageEntry(
oec_session_id_, NULL, &usage_table_header_len, NULL, &usage_entry_len);
metrics_->oemcrypto_update_usage_entry_.Increment(result);
if (result == OEMCrypto_ERROR_SHORT_BUFFER) {
usage_table_header->resize(usage_table_header_len);
@@ -2105,6 +2106,7 @@ CdmResponseType CryptoSession::UpdateUsageEntry(
&usage_table_header_len,
reinterpret_cast<uint8_t*>(const_cast<char*>(usage_entry->data())),
&usage_entry_len);
metrics_->oemcrypto_update_usage_entry_.Increment(result);
}
if (result != OEMCrypto_SUCCESS) {