Bug 1398628 - Remove VIDEO_CDM_CREATED telemetry and the related code. draft
authorJames Cheng <jacheng@mozilla.com>
Mon, 11 Sep 2017 11:51:12 +0800
changeset 662135 0c013a17eb5c821f55f9f73a25c268f5bbcbdcad
parent 662134 87073afc2f4e7c5130c9eb12a7364960f8d4ddc1
child 730754 6294d53c985408307782223568002ce6fafde5d1
push id78961
push userbmo:jacheng@mozilla.com
push dateMon, 11 Sep 2017 03:51:30 +0000
bugs1398628
milestone57.0a1
Bug 1398628 - Remove VIDEO_CDM_CREATED telemetry and the related code. MozReview-Commit-ID: 3xDiz9S90bY
dom/media/eme/EMEUtils.cpp
dom/media/eme/MediaKeys.cpp
toolkit/components/telemetry/Histograms.json
--- a/dom/media/eme/EMEUtils.cpp
+++ b/dom/media/eme/EMEUtils.cpp
@@ -67,20 +67,9 @@ KeySystemToGMPName(const nsAString& aKey
   }
   if (IsWidevineKeySystem(aKeySystem)) {
     return NS_LITERAL_STRING("gmp-widevinecdm");
   }
   MOZ_ASSERT(false, "We should only call this for known GMPs");
   return EmptyString();
 }
 
-CDMType
-ToCDMTypeTelemetryEnum(const nsString& aKeySystem)
-{
-  if (IsWidevineKeySystem(aKeySystem)) {
-    return CDMType::eWidevine;
-  } else if (IsClearkeyKeySystem(aKeySystem)) {
-    return CDMType::eClearKey;
-  }
-  return CDMType::eUnknown;
-}
-
 } // namespace mozilla
--- a/dom/media/eme/MediaKeys.cpp
+++ b/dom/media/eme/MediaKeys.cpp
@@ -447,18 +447,16 @@ MediaKeys::OnCDMCreated(PromiseId aId, c
   promise->MaybeResolve(keys);
   if (mCreatePromiseId == aId) {
     Release();
   }
 
   MediaKeySystemAccess::NotifyObservers(mParent,
                                         mKeySystem,
                                         MediaKeySystemStatus::Cdm_created);
-
-  Telemetry::Accumulate(Telemetry::VIDEO_CDM_CREATED, ToCDMTypeTelemetryEnum(mKeySystem));
 }
 
 static bool
 IsSessionTypeSupported(const MediaKeySessionType aSessionType,
                        const MediaKeySystemConfiguration& aConfig)
 {
   if (aSessionType == MediaKeySessionType::Temporary) {
     // Temporary is always supported.
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -11376,26 +11376,16 @@
     "expires_in_version": "60",
     "bug_numbers": [1230265],
     "kind": "linear",
     "high": 1000,
     "n_buckets": 100,
     "description": "720p VP9 decode benchmark measurement in frames per second",
     "releaseChannelCollection": "opt-out"
   },
-  "VIDEO_CDM_CREATED": {
-    "record_in_processes": ["main", "content"],
-    "alert_emails": ["cpearce@mozilla.com"],
-    "expires_in_version": "58",
-    "bug_numbers": [1304207],
-    "kind": "enumerated",
-    "n_values": 6,
-    "description": "Note the type of CDM (0=ClearKey, 1=Primetime, 2=Widevine, 3=unknown) every time we successfully instantiate an EME MediaKeys object.",
-    "releaseChannelCollection": "opt-out"
-  },
   "MEDIA_CODEC_USED": {
     "record_in_processes": ["main", "content"],
     "alert_emails": ["cpearce@mozilla.com"],
     "expires_in_version": "never",
     "keyed": true,
     "kind": "count",
     "description": "Count of use of audio/video codecs in HTMLMediaElements and WebAudio. Those with 'resource' prefix are approximate; report based on HTTP ContentType or sniffing. Those with 'webaudio' prefix are for WebAudio."
   },