bug 746645 - Adding the white-list for myapps (or stage-myapps) has no effect with a clean FF profile; r=fabrice, a=mfinkle

This commit is contained in:
Myk Melez 2012-04-21 14:15:06 -07:00
Родитель 6dd2beeefb
Коммит 8931955f8e
1 изменённых файлов: 4 добавлений и 6 удалений

Просмотреть файл

@ -47,16 +47,14 @@ let DOMApplicationRegistry = {
Services.obs.addObserver(this, "xpcom-shutdown", false);
let appsDir = FileUtils.getDir(DIRECTORY_NAME, ["webapps"], true, true);
this.appsFile = FileUtils.getFile(DIRECTORY_NAME, ["webapps", "webapps.json"], true);
if (!this.appsFile.exists())
return;
this._loadJSONAsync(this.appsFile, (function(aData) { this.webapps = aData; }).bind(this));
if (this.appsFile.exists()) {
this._loadJSONAsync(this.appsFile, (function(aData) { this.webapps = aData; }).bind(this));
}
try {
let hosts = Services.prefs.getCharPref("dom.mozApps.whitelist")
let hosts = Services.prefs.getCharPref("dom.mozApps.whitelist");
hosts.split(",").forEach(function(aHost) {
Services.perms.add(Services.io.newURI(aHost, null, null), "webapps-manage",
Ci.nsIPermissionManager.ALLOW_ACTION);