B2G/gecko/browser/components/preferences/aboutPermissions.js
/**
   * Sets a permission for the site given a permission type and value.
   *
   * @param aType
   *        The permission type string stored in permission manager.
   *        e.g. "cookie", "geo", "indexedDB", "popup", "image"
   * @param aPerm
   *        The permission value to set for the permission type. This should
   *        be one of the constants defined in nsIPermissionManager.
   */
Sets a permission for the site given a permission type and value.
@param aType
The permission type string stored in permission manager.
Sets a permission for the site given a permission type and value . @param aType The permission type string stored in permission manager .
function Site_setPermission(aType, aPerm) {
    if (aType == "password") {
      this.loginSavingEnabled = aPerm == Ci.nsIPermissionManager.ALLOW_ACTION;
      return;
    }
    Services.perms.add(this.httpURI, aType, aPerm);
  }
function Site_setPermission ( aType , aPerm ) { if ( aType == "password" ) { this . loginSavingEnabled = aPerm == Ci . nsIPermissionManager . ALLOW_ACTION ; return ; } Services . perms . add ( this . httpURI , aType , aPerm ) ; }
Sets a permission for the site given a permission type and value.
Sets a permission for the site given a permission type and value .
// Password saving isn't a nsIPermissionManager permission type, so handle // it seperately. // Using httpURI is kind of bogus, but the permission manager stores the // permission for the host, so the right thing happens in the end.