B2G/gecko/toolkit/mozapps/extensions/XPIProvider.jsm
/**
 * An object that identifies a registry install location for add-ons. The location
 * consists of a registry key which contains string values mapping ID to the
 * path where an add-on is installed
 *
 * @param  aName
 *         The string identifier of this Install Location.
 * @param  aRootKey
 *         The root key (one of the ROOT_KEY_ values from nsIWindowsRegKey).
 * @param  scope
 *         The scope of add-ons installed in this location
 */
An object that identifies a registry install location for add-ons. The location
consists of a registry key which contains string values mapping ID to the
path where an add-on is installed

@param  aName
The string identifier of this Install Location.
@param  aRootKey
The root key (one of the ROOT_KEY_ values from nsIWindowsRegKey).
@param  scope
The scope of add-ons installed in this location
An object that identifies a registry install location for add - ons . The location consists of a registry key which contains string values mapping ID to the path where an add - on is installed @param aName The string identifier of this Install Location . @param aRootKey The root key ( one of the ROOT_KEY_ values from nsIWindowsRegKey ) . @param scope The scope of add - ons installed in this location
function WinRegInstallLocation(aName, aRootKey, aScope) {
  this.locked = true;
  this._name = aName;
  this._rootKey = aRootKey;
  this._scope = aScope;
  this._IDToFileMap = {};
  this._FileToIDMap = {};
  let path = this._appKeyPath + "\\Extensions";
  let key = Cc["@mozilla.org/windows-registry-key;1"].
            createInstance(Ci.nsIWindowsRegKey);
  try {
    key.open(this._rootKey, path, Ci.nsIWindowsRegKey.ACCESS_READ);
  }
  catch (e) {
    return;
  }
  this._readAddons(key);
  key.close();
}
function WinRegInstallLocation ( aName , aRootKey , aScope ) { this . locked = true ; this . _name = aName ; this . _rootKey = aRootKey ; this . _scope = aScope ; this . _IDToFileMap = { } ; this . _FileToIDMap = { } ; let path = this . _appKeyPath + "\\Extensions" ; let key = Cc [ "@mozilla.org/windows-registry-key;1" ] . createInstance ( Ci . nsIWindowsRegKey ) ; try { key . open ( this . _rootKey , path , Ci . nsIWindowsRegKey . ACCESS_READ ) ; } catch ( e ) { return ; } this . _readAddons ( key ) ; key . close ( ) ; }
An object that identifies a registry install location for add-ons.
An object that identifies a registry install location for add - ons .
// Reading the registry may throw an exception, and that's ok.  In error // cases, we just leave ourselves in the empty state.