Chromium Code Reviews| Index: media/cdm/ppapi/cdm_adapter.h |
| diff --git a/media/cdm/ppapi/cdm_adapter.h b/media/cdm/ppapi/cdm_adapter.h |
| index 1a05ada7801e028341312f64eb4fed119c4aac96..e5ac9febedbbe68bcf9eed6f10ab3db8bb502166 100644 |
| --- a/media/cdm/ppapi/cdm_adapter.h |
| +++ b/media/cdm/ppapi/cdm_adapter.h |
| @@ -106,6 +106,16 @@ class CdmAdapter : public pp::Instance, |
| virtual cdm::FileIO* CreateFileIO(cdm::FileIOClient* client) OVERRIDE; |
| private: |
| + // These are reported to UMA server. Do not change the existing values! |
|
ddorwin
2014/04/30 19:49:03
Should you hard-code the values to make it harder
xhwang
2014/04/30 21:55:29
Done.
|
| + enum OutputProtectionStatus { |
| + OUTPUT_PROTECTION_QUERIED, |
| + OUTPUT_PROTECTION_QUERY_ERROR, |
| + OUTPUT_PROTECTION_NO_EXTERNAL_LINK, |
| + OUTPUT_PROTECTION_EXTERNAL_LINK_PROTECTED, |
|
ddorwin
2014/04/30 19:49:03
ALL_...LINKS_...?
xhwang
2014/04/30 21:55:29
Done.
|
| + OUTPUT_PROTECTION_EXTERNAL_LINK_NOT_PROTECTED, |
|
ddorwin
2014/04/30 19:49:03
Will be calculated rather than reported?
xhwang
2014/04/30 21:55:29
Done.
|
| + OUTPUT_PROTECTION_MAX |
| + }; |
| + |
| typedef linked_ptr<DecryptedBlockImpl> LinkedDecryptedBlock; |
| typedef linked_ptr<VideoFrameImpl> LinkedVideoFrame; |
| typedef linked_ptr<AudioFramesImpl> LinkedAudioFrames; |
| @@ -165,6 +175,9 @@ class CdmAdapter : public pp::Instance, |
| #endif // !defined(NDEBUG) |
| #if defined(OS_CHROMEOS) |
| + void ReportOutputProtectionStatus(OutputProtectionStatus status); |
| + void ReportOutputProtectionQueryResult(int32_t result); |
| + |
| void SendPlatformChallengeDone(int32_t result); |
| void EnableProtectionDone(int32_t result); |
| void QueryOutputProtectionStatusDone(int32_t result); |
| @@ -184,6 +197,13 @@ class CdmAdapter : public pp::Instance, |
| uint32_t output_link_mask_; |
| uint32_t output_protection_mask_; |
| bool query_output_protection_in_progress_; |
| + |
| + // We report the following stats to UMA: |
| + // - Whether output protection has been queried. |
| + // - Result of the first output protection query. |
| + // The following two variables help track the status of the UMA reporting. |
| + bool uma_for_output_protection_query_reported_; |
| + bool uma_for_output_protection_result_reported_; |
| #endif |
| PpbBufferAllocator allocator_; |