Index: media/cdm/ppapi/ppapi_cdm_adapter.cc |
diff --git a/media/cdm/ppapi/ppapi_cdm_adapter.cc b/media/cdm/ppapi/ppapi_cdm_adapter.cc |
index a28d7037db85777666dbd642ffa4ceedd4415e68..f1763b222e980336f25878bf41d0e4640b412f65 100644 |
--- a/media/cdm/ppapi/ppapi_cdm_adapter.cc |
+++ b/media/cdm/ppapi/ppapi_cdm_adapter.cc |
@@ -355,6 +355,19 @@ CdmWrapper* PpapiCdmAdapter::CreateCdmInstance(const std::string& key_system) { |
DLOG_TO_CONSOLE(message); |
CDM_DLOG() << message; |
+ if (cdm) { |
+ pp::UMAPrivate uma_interface(this); |
+ |
+ // The interface version is relatively small. So using normal histogram |
+ // instead of a sparse histogram is okay. The following DCHECK asserts this. |
+ PP_DCHECK(cdm->GetInterfaceVersion() <= 100); |
Ilya Sherman
2016/08/23 02:35:32
Please set the upper bound to something closer to
xhwang
2016/08/23 19:07:14
Done with 30, which will be enough for several yea
|
+ uma_interface.HistogramEnumeration( |
+ "Media.EME.CdmInterfaceVersion", cdm->GetInterfaceVersion(), |
+ // Sample value should always be less than the boundary. Hence use "+1". |
+ // See the comment on HistogramEnumeration in ppb_uma_private.idl. |
+ cdm::ContentDecryptionModule::kVersion + 1); |
+ } |
+ |
return cdm; |
} |