Add an interface for nested URIs (like jar:, view-source:, etc) to implement

and use it in various places.  Create null principals if asked for a codebase
principal for a codebase that doesn't have an inherent security context (eg
data: or javascript:).  Bug 334407, r=biesi,dveditz, sr=darin
This commit is contained in:
bzbarsky@mit.edu
2006-05-02 18:54:19 +00:00
parent f0694fae29
commit ddb5e4346d
28 changed files with 676 additions and 111 deletions

View File

@@ -226,6 +226,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsGopherHandler)
#ifdef NECKO_PROTOCOL_viewsource
#include "nsViewSourceHandler.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(nsViewSourceHandler)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsViewSourceURI)
#endif
#ifdef NECKO_PROTOCOL_data
@@ -1133,6 +1134,11 @@ static const nsModuleComponentInfo gNetModuleInfo[] = {
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "view-source",
nsViewSourceHandlerConstructor
},
{ "The ViewSource URI",
NS_VIEWSOURCEURI_CID,
nsnull,
nsViewSourceURIConstructor
},
#endif
#ifdef XP_WIN