Re: File URL To Chrome/Resource URL
Benjamin Smedberg <[email protected]> Thu, 29 Dec 2011 10:41:31 -0500
| Newsgroups | gmane.comp.mozilla.devel.jsdebugger |
|---|---|
| Message-ID | <[email protected]> |
On 12/29/2011 10:06 AM, Edmond Begumisa wrote: > > nsIChromeRegistry::convertChromeURL and > nsIResProtocolHandler::resolveURI provide a convenient way of getting > a local file path from chrome:* and registry:* URIs. Anyone know of an > equally easy way of doing the opposite? > > That is, finding the first chrome: or resource: URI resolving to a > particular local file: URI? The chrome registry does not expose a list of chrome packages, so no, there is currently no builtin way to do this. I'd accept a patch which hands back a list of the current set of chrome package mappings. The resource registry is even more "interesting" because there are cases where resource mappings are looked up dynamically (from the directory service) and so we don't even know the list of resource mappings until somebody tries to load from them. --BDS