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:
@@ -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);
|
||||
|
||||
@@ -181,20 +181,30 @@ class CdmEngineMetricsImpl : public T {
|
||||
}
|
||||
|
||||
CdmResponseType GetUsageInfo(const std::string& app_id,
|
||||
CdmResponseType* error_detail,
|
||||
CdmUsageInfo* usage_info) override {
|
||||
CdmResponseType sts;
|
||||
M_TIME(sts = T::GetUsageInfo(app_id, usage_info),
|
||||
metrics_, cdm_engine_get_usage_info_, sts);
|
||||
CdmResponseType error_detail_alt;
|
||||
M_TIME(sts = T::GetUsageInfo(app_id, &error_detail_alt, usage_info),
|
||||
metrics_, cdm_engine_get_usage_info_, sts, error_detail_alt);
|
||||
if (error_detail != nullptr) {
|
||||
*error_detail = error_detail_alt;
|
||||
}
|
||||
return sts;
|
||||
}
|
||||
|
||||
|
||||
CdmResponseType GetUsageInfo(const std::string& app_id,
|
||||
const CdmSecureStopId& ssid,
|
||||
CdmResponseType* error_detail,
|
||||
CdmUsageInfo* usage_info) override {
|
||||
CdmResponseType sts;
|
||||
M_TIME(sts = T::GetUsageInfo(app_id, ssid, usage_info),
|
||||
metrics_, cdm_engine_get_usage_info_, sts);
|
||||
CdmResponseType error_detail_alt;
|
||||
M_TIME(sts = T::GetUsageInfo(app_id, ssid, &error_detail_alt, usage_info),
|
||||
metrics_, cdm_engine_get_usage_info_, sts, error_detail_alt);
|
||||
if (error_detail != nullptr) {
|
||||
*error_detail = error_detail_alt;
|
||||
}
|
||||
return sts;
|
||||
}
|
||||
|
||||
|
||||
@@ -61,9 +61,11 @@ class CdmSession {
|
||||
WvCdmEventListener* event_listener);
|
||||
|
||||
virtual CdmResponseType RestoreOfflineSession(
|
||||
const CdmKeySetId& key_set_id, CdmLicenseType license_type);
|
||||
const CdmKeySetId& key_set_id, CdmLicenseType license_type,
|
||||
CdmResponseType* error_detail);
|
||||
virtual CdmResponseType RestoreUsageSession(
|
||||
const DeviceFiles::CdmUsageData& usage_data);
|
||||
const DeviceFiles::CdmUsageData& usage_data,
|
||||
CdmResponseType* error_detail);
|
||||
|
||||
virtual const CdmSessionId& session_id() { return session_id_; }
|
||||
virtual const CdmKeySetId& key_set_id() { return key_set_id_; }
|
||||
|
||||
Reference in New Issue
Block a user