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

Unified Diff: media/cdm/ppapi/cdm_adapter.h

Issue 253313004: CdmAdapter: Add UMA for output protection queries and results. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed Created 6 years, 8 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 | media/cdm/ppapi/cdm_adapter.cc » ('j') | media/cdm/ppapi/cdm_adapter.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..89876dade02c712e3a1cee2027adb86ae384c1a6 100644
--- a/media/cdm/ppapi/cdm_adapter.h
+++ b/media/cdm/ppapi/cdm_adapter.h
@@ -106,6 +106,15 @@ 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!
+ enum OutputProtectionStatus {
+ OUTPUT_PROTECTION_QUERIED = 0,
ddorwin 2014/04/30 23:13:35 It seems odd to have the "total" value in the same
xhwang 2014/04/30 23:48:16 Agreed. But that makes it harder to dig out data.
+ OUTPUT_PROTECTION_QUERY_ERROR = 1,
ddorwin 2014/04/30 23:13:35 This is not "positive". Should we just consider th
xhwang 2014/04/30 23:48:16 Done.
+ OUTPUT_PROTECTION_NO_EXTERNAL_LINK = 2,
+ OUTPUT_PROTECTION_ALL_EXTERNAL_LINKS_PROTECTED = 3,
+ OUTPUT_PROTECTION_MAX = 4
+ };
+
typedef linked_ptr<DecryptedBlockImpl> LinkedDecryptedBlock;
typedef linked_ptr<VideoFrameImpl> LinkedVideoFrame;
typedef linked_ptr<AudioFramesImpl> LinkedAudioFrames;
@@ -165,6 +174,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 +196,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.
+ // - Whether a positive result (no unprotected external link) is returned.
ddorwin 2014/04/30 23:13:35 What about QUERY_ERROR? That's not positive. "Whe
xhwang 2014/04/30 23:48:16 Done.
+ // The following two variables help track the status of the UMA reporting.
+ bool uma_for_output_protection_query_reported_;
+ bool uma_for_output_protection_positive_result_reported_;
#endif
PpbBufferAllocator allocator_;
« no previous file with comments | « no previous file | media/cdm/ppapi/cdm_adapter.cc » ('j') | media/cdm/ppapi/cdm_adapter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698