assume in loaded modules that the resource:// alias has already been added - remove all the templatey code to do that

This commit is contained in:
Dan Mills 2007-12-11 11:57:13 -08:00
Родитель 085f383f57
Коммит 8c9defe994
7 изменённых файлов: 0 добавлений и 120 удалений

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

@ -41,7 +41,6 @@ const Ci = Components.interfaces;
const Cr = Components.results;
const Cu = Components.utils;
addModuleAlias("weave", "{340c2bbc-ce74-4362-90b5-7c26312808ef}");
Cu.import("resource://weave/log4moz.js");
Cu.import("resource://weave/constants.js");
Cu.import("resource://weave/util.js");
@ -178,19 +177,3 @@ WeaveCrypto.prototype = {
return out;
}
};
function addModuleAlias(alias, extensionId) {
let ioSvc = Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService);
let resProt = ioSvc.getProtocolHandler("resource")
.QueryInterface(Ci.nsIResProtocolHandler);
if (!resProt.hasSubstitution(alias)) {
let extMgr = Cc["@mozilla.org/extensions/manager;1"]
.getService(Ci.nsIExtensionManager);
let loc = extMgr.getInstallLocation(extensionId);
let extD = loc.getItemLocation(extensionId);
extD.append("modules");
resProt.setSubstitution(alias, ioSvc.newFileURI(extD));
}
}

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

@ -41,7 +41,6 @@ const Ci = Components.interfaces;
const Cr = Components.results;
const Cu = Components.utils;
addModuleAlias("weave", "{340c2bbc-ce74-4362-90b5-7c26312808ef}");
Cu.import("resource://weave/log4moz.js");
Cu.import("resource://weave/util.js");
@ -541,19 +540,3 @@ DummyAuthProvider.prototype = {
aStatus, aStatusArg) {
}
};
function addModuleAlias(alias, extensionId) {
let ioSvc = Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService);
let resProt = ioSvc.getProtocolHandler("resource")
.QueryInterface(Ci.nsIResProtocolHandler);
if (!resProt.hasSubstitution(alias)) {
let extMgr = Cc["@mozilla.org/extensions/manager;1"]
.getService(Ci.nsIExtensionManager);
let loc = extMgr.getInstallLocation(extensionId);
let extD = loc.getItemLocation(extensionId);
extD.append("modules");
resProt.setSubstitution(alias, ioSvc.newFileURI(extD));
}
}

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

@ -41,7 +41,6 @@ const Ci = Components.interfaces;
const Cr = Components.results;
const Cu = Components.utils;
addModuleAlias("weave", "{340c2bbc-ce74-4362-90b5-7c26312808ef}");
Cu.import("resource://weave/log4moz.js");
Cu.import("resource://weave/constants.js");
Cu.import("resource://weave/util.js");
@ -679,19 +678,3 @@ serializeConflicts: function serializeConflicts(conflicts) {
json = json.replace(/ {action/g, "\n {action");
return json;
}
function addModuleAlias(alias, extensionId) {
let ioSvc = Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService);
let resProt = ioSvc.getProtocolHandler("resource")
.QueryInterface(Ci.nsIResProtocolHandler);
if (!resProt.hasSubstitution(alias)) {
let extMgr = Cc["@mozilla.org/extensions/manager;1"]
.getService(Ci.nsIExtensionManager);
let loc = extMgr.getInstallLocation(extensionId);
let extD = loc.getItemLocation(extensionId);
extD.append("modules");
resProt.setSubstitution(alias, ioSvc.newFileURI(extD));
}
}

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

@ -41,7 +41,6 @@ const Ci = Components.interfaces;
const Cr = Components.results;
const Cu = Components.utils;
addModuleAlias("weave", "{340c2bbc-ce74-4362-90b5-7c26312808ef}");
Cu.import("resource://weave/log4moz.js");
Cu.import("resource://weave/constants.js");
Cu.import("resource://weave/util.js");
@ -115,19 +114,3 @@ function setPassword(realm, username, password) {
username, password, null, null);
lm.addLogin(login);
}
function addModuleAlias(alias, extensionId) {
let ioSvc = Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService);
let resProt = ioSvc.getProtocolHandler("resource")
.QueryInterface(Ci.nsIResProtocolHandler);
if (!resProt.hasSubstitution(alias)) {
let extMgr = Cc["@mozilla.org/extensions/manager;1"]
.getService(Ci.nsIExtensionManager);
let loc = extMgr.getInstallLocation(extensionId);
let extD = loc.getItemLocation(extensionId);
extD.append("modules");
resProt.setSubstitution(alias, ioSvc.newFileURI(extD));
}
}

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

@ -41,7 +41,6 @@ const Ci = Components.interfaces;
const Cr = Components.results;
const Cu = Components.utils;
addModuleAlias("weave", "{340c2bbc-ce74-4362-90b5-7c26312808ef}");
Cu.import("resource://weave/log4moz.js");
Cu.import("resource://weave/constants.js");
Cu.import("resource://weave/util.js");
@ -429,20 +428,3 @@ WeaveSyncService.prototype = {
this._bmkEngine.resetClient(function() {self._unlock()});
}
};
function addModuleAlias(alias, extensionId) {
let ioSvc = Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService);
let resProt = ioSvc.getProtocolHandler("resource")
.QueryInterface(Ci.nsIResProtocolHandler);
if (!resProt.hasSubstitution(alias)) {
let extMgr = Cc["@mozilla.org/extensions/manager;1"]
.getService(Ci.nsIExtensionManager);
let loc = extMgr.getInstallLocation(extensionId);
let extD = loc.getItemLocation(extensionId);
extD.append("modules");
resProt.setSubstitution(alias, ioSvc.newFileURI(extD));
}
}

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

@ -42,7 +42,6 @@ const Ci = Components.interfaces;
const Cr = Components.results;
const Cu = Components.utils;
addModuleAlias("weave", "{340c2bbc-ce74-4362-90b5-7c26312808ef}");
Cu.import("resource://weave/constants.js");
Cu.import("resource://weave/log4moz.js");
@ -192,19 +191,3 @@ EventListener.prototype = {
this._handler(timer);
}
};
function addModuleAlias(alias, extensionId) {
let ioSvc = Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService);
let resProt = ioSvc.getProtocolHandler("resource")
.QueryInterface(Ci.nsIResProtocolHandler);
if (!resProt.hasSubstitution(alias)) {
let extMgr = Cc["@mozilla.org/extensions/manager;1"]
.getService(Ci.nsIExtensionManager);
let loc = extMgr.getInstallLocation(extensionId);
let extD = loc.getItemLocation(extensionId);
extD.append("modules");
resProt.setSubstitution(alias, ioSvc.newFileURI(extD));
}
}

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

@ -41,25 +41,8 @@ const Ci = Components.interfaces;
const Cr = Components.results;
const Cu = Components.utils;
addModuleAlias("weave", "{340c2bbc-ce74-4362-90b5-7c26312808ef}");
Cu.import("resource://weave/service.js");
let Weave = {};
//Weave.Crypto = new WeaveCrypto();
Weave.Service = new WeaveSyncService();
function addModuleAlias(alias, extensionId) {
let ioSvc = Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService);
let resProt = ioSvc.getProtocolHandler("resource")
.QueryInterface(Ci.nsIResProtocolHandler);
if (!resProt.hasSubstitution(alias)) {
let extMgr = Cc["@mozilla.org/extensions/manager;1"]
.getService(Ci.nsIExtensionManager);
let loc = extMgr.getInstallLocation(extensionId);
let extD = loc.getItemLocation(extensionId);
extD.append("modules");
resProt.setSubstitution(alias, ioSvc.newFileURI(extD));
}
}