B2G/gecko/toolkit/mozapps/update/nsUpdateService.js
/**
   * Submit a telemetry ping with a boolean value which indicates if the service
   * is installed.
   * Also submits a telemetry ping with a boolean value which indicates if the
   * service was at some point installed, but is now uninstalled.
   */
Submit a telemetry ping with a boolean value which indicates if the service
is installed.
Also submits a telemetry ping with a boolean value which indicates if the
service was at some point installed, but is now uninstalled.
Submit a telemetry ping with a boolean value which indicates if the service is installed . Also submits a telemetry ping with a boolean value which indicates if the service was at some point installed but is now uninstalled .
function AUS__svcInstallTelemetryPing() {
    let installed = 0;
    let attempted = 0;
    try {
      let wrk = Components.classes["@mozilla.org/windows-registry-key;1"]
                .createInstance(Components.interfaces.nsIWindowsRegKey);
      wrk.open(wrk.ROOT_KEY_LOCAL_MACHINE,
               "SOFTWARE\\Mozilla\\MaintenanceService",
               wrk.ACCESS_READ | wrk.WOW64_64);
      attempted = wrk.readIntValue("Attempted");
      installed = wrk.readIntValue("Installed");
      wrk.close();
    } catch(e) {
    }
    try {
      let h = Services.telemetry.getHistogramById("UPDATER_SERVICE_INSTALLED");
      h.add(installed);
    } catch(e) {
      Components.utils.reportError(e);
    }
    try {
      let h = Services.telemetry.getHistogramById("UPDATER_SERVICE_MANUALLY_UNINSTALLED");
      h.add(!installed && attempted ? 1 : 0);
    } catch(e) {
      Components.utils.reportError(e);
    }
  }
function AUS__svcInstallTelemetryPing ( ) { let installed = 0 ; let attempted = 0 ; try { let wrk = Components . classes [ "@mozilla.org/windows-registry-key;1" ] . createInstance ( Components . interfaces . nsIWindowsRegKey ) ; wrk . open ( wrk . ROOT_KEY_LOCAL_MACHINE , "SOFTWARE\\Mozilla\\MaintenanceService" , wrk . ACCESS_READ | wrk . WOW64_64 ) ; attempted = wrk . readIntValue ( "Attempted" ) ; installed = wrk . readIntValue ( "Installed" ) ; wrk . close ( ) ; } catch ( e ) { } try { let h = Services . telemetry . getHistogramById ( "UPDATER_SERVICE_INSTALLED" ) ; h . add ( installed ) ; } catch ( e ) { Components . utils . reportError ( e ) ; } try { let h = Services . telemetry . getHistogramById ( "UPDATER_SERVICE_MANUALLY_UNINSTALLED" ) ; h . add ( ! installed && attempted ? 1 : 0 ) ; } catch ( e ) { Components . utils . reportError ( e ) ; } }
Submit a telemetry ping with a boolean value which indicates if the service
 is installed.
Submit a telemetry ping with a boolean value which indicates if the service is installed .
// Don't allow any exception to be propagated. // Don't allow any exception to be propagated.