Bug 744985: Redirect about:apps to apps dashboard; r=gps

This commit is contained in:
Anant Narayanan 2012-06-27 17:39:18 -07:00
parent 3604701207
commit e2bbcf2b41
2 changed files with 26 additions and 1 deletions

View File

@ -79,5 +79,26 @@ AitcService.prototype = {
};
const components = [AitcService];
function AboutApps() {
}
AboutApps.prototype = {
classID: Components.ID("{1de7cbe8-60f1-493e-b56b-9d099b3c018e}"),
QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports,
Ci.nsIAboutModule]),
getURIFlags: function(aURI) {
return Ci.nsIAboutModule.ALLOW_SCRIPT;
},
newChannel: function(aURI) {
let channel = Services.io.newChannel(
Preferences.get("services.aitc.dashboard.url"), null, null
);
channel.originalURI = aURI;
return channel;
}
};
const components = [AitcService, AboutApps];
const NSGetFactory = XPCOMUtils.generateNSGetFactory(components);

View File

@ -2,5 +2,9 @@
component {a3d387ca-fd26-44ca-93be-adb5fda5a78d} Aitc.js
contract @mozilla.org/services/aitc;1 {a3d387ca-fd26-44ca-93be-adb5fda5a78d}
category app-startup AitcService service,@mozilla.org/services/aitc;1
component {1de7cbe8-60f1-493e-b56b-9d099b3c018e} Aitc.js
contract @mozilla.org/network/protocol/about;1?what=apps {1de7cbe8-60f1-493e-b56b-9d099b3c018e}
# Register resource aliases
resource services-aitc resource:///modules/services-aitc/