mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 14:25:52 +00:00
Bug 1449248 - Manually add handler for resource://tps uri in TPS r=kitcambridge
MozReview-Commit-ID: 97YR2gOlOKC --HG-- extra : rebase_source : 1766078e99e8b8e08677c0339ce5e8e34be868c8
This commit is contained in:
parent
ca8f68d641
commit
9c92761c4d
@ -11,9 +11,13 @@ XPCOMUtils.defineLazyServiceGetter(this, "categoryManager",
|
||||
"@mozilla.org/categorymanager;1",
|
||||
"nsICategoryManager");
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "resProto",
|
||||
"@mozilla.org/network/protocol;1?name=resource",
|
||||
"nsISubstitutingProtocolHandler");
|
||||
|
||||
const Cm = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
|
||||
|
||||
const CATMAN_CONTRACTID = "@mozilla.org/categorymanager;1";
|
||||
const CATMAN_CONTRACTID = "@mozilla.org/categorymanager;1";
|
||||
|
||||
const CATEGORY_NAME = "command-line-handler";
|
||||
const CATEGORY_ENTRY = "m-tps";
|
||||
@ -89,9 +93,11 @@ TPSCmdLine.prototype = {
|
||||
|
||||
function startup(data, reason) {
|
||||
TPSCmdLine.prototype.register();
|
||||
resProto.setSubstitution("tps", Services.io.newURI("resource", null, data.resourceURI));
|
||||
}
|
||||
|
||||
function shutdown(data, reason) {
|
||||
resProto.setSubstitution("tps", null);
|
||||
TPSCmdLine.prototype.unregister();
|
||||
}
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
resource tps resource/
|
@ -15,7 +15,7 @@
|
||||
<Description>
|
||||
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
|
||||
<em:minVersion>24.0.*</em:minVersion>
|
||||
<em:maxVersion>31.0.*</em:maxVersion>
|
||||
<em:maxVersion>*</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user