B2G/gecko/toolkit/mozapps/extensions/test/browser/head.js
/**
   * Called to get the current AddonInstalls, optionally restricting by type.
   *
   * @param  aTypes
   *         An array of types or null to get all types
   * @param  aCallback
   *         A callback to pass the array of AddonInstalls to
   */
Called to get the current AddonInstalls, optionally restricting by type.
@param  aTypes
An array of types or null to get all types
@param  aCallback
A callback to pass the array of AddonInstalls to
Called to get the current AddonInstalls optionally restricting by type . @param aTypes An array of types or null to get all types @param aCallback A callback to pass the array of AddonInstalls to
function MP_getInstallsByTypes(aTypes, aCallback) {
    var installs = this.installs.filter(function(aInstall) {
      if (aInstall.state == AddonManager.STATE_CANCELLED)
        return false;
      if (aTypes && aTypes.length > 0 && aTypes.indexOf(aInstall.type) == -1)
        return false;
      return true;
    });
    this._delayCallback(aCallback, installs);
  }
function MP_getInstallsByTypes ( aTypes , aCallback ) { var installs = this . installs . filter ( function ( aInstall ) { if ( aInstall . state == AddonManager . STATE_CANCELLED ) return false ; if ( aTypes && aTypes . length > 0 && aTypes . indexOf ( aInstall . type ) == - 1 ) return false ; return true ; } ) ; this . _delayCallback ( aCallback , installs ) ; }
Called to get the current AddonInstalls, optionally restricting by type.
Called to get the current AddonInstalls optionally restricting by type .
// Appear to have actually removed cancelled installs from the provider