Bug 1053746 - Add telemtry for OpenH264 plugin, r=gfritzsche
authorBenjamin Smedberg <benjamin@smedbergs.us>
Wed, 08 Oct 2014 10:54:08 -0400
changeset 209358 bbbf658ef840a51cac276ceefb994047062cce81
parent 209357 51d3f2b58ac164a9a0ecb5ee20499373c1d219e2
child 209359 73b8074b7299d608ca96fa1368aceb90f4e39506
push id27615
push userkwierso@gmail.com
push dateWed, 08 Oct 2014 23:37:42 +0000
treeherdermozilla-central@7b16babf6a73 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgfritzsche
bugs1053746
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1053746 - Add telemtry for OpenH264 plugin, r=gfritzsche
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);