Add error detail metric to some session methods

[ Merge from http://go/wvgerrit/71726 ]

Adds an error detail metric attribute to RestoreUsageSession and
RestoreOfflineSession. These metrics will now report an additional
attribute providing additional error detail for debugging.

BUG: http://b/115517916

Test: CDM Unit Tests. Manually tried GPlay.

Change-Id: Ib48361ef29d33a16150473d8967e4850bc0c623d
This commit is contained in:
Adam Stone
2019-01-30 10:31:24 -08:00
parent b56fd5e7bb
commit 605ff83103
10 changed files with 97 additions and 28 deletions

View File

@@ -225,14 +225,19 @@ class CdmEngine {
// Usage related methods for streaming licenses
// Retrieve a random usage info from the list of all usage infos for this app
// id.
// id. If |error_detail| is not null, an additional error code may be provided
// in the event of an error.
virtual CdmResponseType GetUsageInfo(const std::string& app_id,
CdmResponseType* error_detail,
CdmUsageInfo* usage_info);
// Retrieve the usage info for the specified pst.
// Returns UNKNOWN_ERROR if no usage info was found.
// id. If |error_detail| is not null, an additional error code may be provided
// in the event of an error.
virtual CdmResponseType GetUsageInfo(const std::string& app_id,
const CdmSecureStopId& ssid,
CdmResponseType* error_detail,
CdmUsageInfo* usage_info);
// Remove all usage records for the current origin.
@@ -358,6 +363,7 @@ class CdmEngine {
bool ValidateKeySystem(const CdmKeySystem& key_system);
CdmResponseType GetUsageInfo(const std::string& app_id,
SecurityLevel requested_security_level,
CdmResponseType* error_detail,
CdmUsageInfo* usage_info);
void OnKeyReleaseEvent(const CdmKeySetId& key_set_id);