rem: addPermission: function (aPermission) 
add: addPermission: function (aCapability) 
context:   addPermission: function (aPermission)  {    var textbox = document.getElementById("url");    var host = textbox.value.replace(/^\s*([-\w]*:\/+)?/, ""); // trim any leading space and scheme    try {      var ioService = Components.classes["@mozilla.org/network/io-service;1"]                                .getService(Components.interfaces.nsIIOService);      var uri = ioService.newURI("http://"+host, null, null);      host = uri.host;    } catch(ex) {      var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]                                    .getService(Components.interfaces.nsIPromptService);      var message = stringBundle.getString("invalidURI");      var title = stringBundle.getString("invalidURITitle");      promptservice.alert(window,title,message);    }    var capabilityString = this._getCapabilityString(aPermission);    // check whether the permission already exists, if not, add it    var exists = false;    for (var i = 0; i < this._permissions.length; ++i) {      if (this._permissions[i].rawHost == host) {        exists = true;        this._permissions[i].capability = capabilityString;        this._permissions[i].perm = aPermission;        break;      }    }        if (!exists) {      var p = new Permission(host,                              (host.charAt(0) == ".") ? host.substring(1,host.length) : host,                              this._type,                              capabilityString,                             aPermission);      this._permissions.push(p);            this._view._rowCount = this._permissions.length;      this._tree.treeBoxObject.rowCountChanged(this._permissions.length-1, 1);      this._tree.treeBoxObject.ensureRowIsVisible(this._permissions.length-1);            uri.spec = p.host;      this._pm.add(uri, p.type, p.perm);    }    textbox.value = "";    textbox.focus();    // covers a case where the site exists already, so the buttons don't disable    this.onHostInput(textbox);    // enable "remove all" button as needed    document.getElementById("removeAllPermissions").disabled = this._permissions.length == 0;  },
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/a7066b5e56b6b91626e74c12b107d8f783fc2a61/permissions.js/clean/browser/components/preferences/permissions.js