Bug 1053746 - Add telemetry for OpenH264 plugin. r=gfritzsche, a=lmandel
authorBenjamin Smedberg <benjamin@smedbergs.us>
Wed, 08 Oct 2014 10:54:08 -0400
changeset 225633 39a9012afc3ce46c849d0b049237aa1fe9452e78
parent 225632 20489053659f2a6ee05699e4f7a0635a196c2db3
child 225634 5e5b1ec4a370f3ee2c02a2adbe7e75e37ebd9f00
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgfritzsche, lmandel
bugs1053746
milestone34.0a2
Bug 1053746 - Add telemetry for OpenH264 plugin. r=gfritzsche, a=lmandel
toolkit/mozapps/extensions/internal/OpenH264Provider.jsm
--- a/toolkit/mozapps/extensions/internal/OpenH264Provider.jsm
+++ b/toolkit/mozapps/extensions/internal/OpenH264Provider.jsm
@@ -271,16 +271,26 @@ let OpenH264Provider = {
     if (this.gmpPath && enabled) {
       this._log.info("startup() - adding gmp directory " + this.gmpPath);
       try {
         gmpService.addPluginDirectory(this.gmpPath);
       } catch (e if e.name == 'NS_ERROR_NOT_AVAILABLE') {
         this._log.warning("startup() - adding gmp directory failed with " + e.name + " - sandboxing not available?");
       }
     }
+
+    let telemetry = {};
+    if (this.isEnabled) {
+      telemetry[OPENH264_PLUGIN_ID] = {
+	userDisabled: OpenH264Wrapper.userDisabled,
+	version: OpenH264Wrapper.version,
+	applyBackgroundUpdates: OpenH264Wrapper.applyBackgroundUpdates,
+      };
+    }
+    AddonManagerPrivate.setTelemetryDetails("GMP", telemetry);
   },
 
   shutdown: function() {
     this._log.trace("shutdown()");
     Services.obs.removeObserver(this, AddonManager.OPTIONS_NOTIFICATION_DISPLAYED);
     prefs.ignore(OPENH264_PREF_ENABLED, this.onPrefEnabledChanged, this);
     prefs.ignore(OPENH264_PREF_VERSION, this.onPrefVersionChanged, this);
     prefs.ignore(OPENH264_PREF_LOGGING, configureLogging);