patch for bug 191970 "necko configuration options for footprint reduction" r=seawood sr=dbaron

git-svn-id: svn://10.0.0.236/trunk@141664 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
darin%netscape.com
2003-04-23 03:47:43 +00:00
parent 85801be1fd
commit 4606489f20
13 changed files with 277 additions and 50 deletions

View File

@@ -35,6 +35,8 @@
*
* ***** END LICENSE BLOCK ***** */
#include "necko-config.h"
#include "nsCOMPtr.h"
#include "nsIModule.h"
#include "nsIGenericFactory.h"
@@ -125,8 +127,37 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsDirIndex)
#include "nsStreamListenerTee.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(nsStreamListenerTee)
///////////////////////////////////////////////////////////////////////////////
// protocols
///////////////////////////////////////////////////////////////////////////////
// about:blank is mandatory
#include "nsAboutProtocolHandler.h"
#include "nsAboutBlank.h"
#ifdef NECKO_PROTOCOL_about
// about
#include "nsAboutBloat.h"
#include "nsAboutCache.h"
#include "nsAboutRedirector.h"
#include "nsAboutCacheEntry.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAboutCacheEntry)
#endif
#ifdef NECKO_PROTOCOL_file
// file
#include "nsFileProtocolHandler.h"
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFileProtocolHandler, Init)
#endif
#ifdef NECKO_PROTOCOL_ftp
// ftp
#include "nsFtpProtocolHandler.h"
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFtpProtocolHandler, Init);
#endif
#ifdef NECKO_PROTOCOL_http
// http/https
#include "nsHttpHandler.h"
#include "nsHttpAuthManager.h"
#include "nsHttpBasicAuth.h"
@@ -137,17 +168,24 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHttpNTLMAuth, Init)
#endif
#undef LOG
#undef LOG_ENABLED
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHttpHandler, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHttpsHandler, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHttpAuthManager, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpBasicAuth)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpDigestAuth)
///////////////////////////////////////////////////////////////////////////////
#endif // !NECKO_PROTOCOL_http
#ifdef NECKO_PROTOCOL_jar
// jar
#include "nsJARProtocolHandler.h"
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsJARProtocolHandler, Init)
#endif
#ifdef NECKO_PROTOCOL_res
// resource
#include "nsResProtocolHandler.h"
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsResProtocolHandler, Init)
#endif
///////////////////////////////////////////////////////////////////////////////
@@ -176,25 +214,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsIDNService, Init)
///////////////////////////////////////////////////////////////////////////////
#include "nsFileProtocolHandler.h"
#include "nsJARProtocolHandler.h"
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFileProtocolHandler, Init)
#include "nsJARProtocolHandler.h"
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsJARProtocolHandler, Init)
#include "nsAboutProtocolHandler.h"
#include "nsAboutBlank.h"
#include "nsAboutBloat.h"
#include "nsAboutCache.h"
#include "nsAboutRedirector.h"
#include "nsAboutCacheEntry.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAboutCacheEntry)
///////////////////////////////////////////////////////////////////////////////
#include "nsFtpProtocolHandler.h"
#include "nsFTPDirListingConv.h"
#include "nsGopherDirListingConv.h"
#include "nsMultiMixedConv.h"
@@ -207,8 +226,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsAboutCacheEntry)
#include "nsBinHexDecoder.h"
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFtpProtocolHandler, Init);
nsresult NS_NewFTPDirListingConv(nsFTPDirListingConv** result);
nsresult NS_NewGopherDirListingConv(nsGopherDirListingConv** result);
nsresult NS_NewMultiMixedConv (nsMultiMixedConv** result);
@@ -794,13 +811,16 @@ static const nsModuleComponentInfo gNetModuleInfo[] = {
nsMIMEInfoImplConstructor
},
#ifdef NECKO_PROTOCOL_file
// from netwerk/protocol/file:
{ NS_FILEPROTOCOLHANDLER_CLASSNAME,
NS_FILEPROTOCOLHANDLER_CID,
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "file",
nsFileProtocolHandlerConstructor
},
#endif
#ifdef NECKO_PROTOCOL_http
{ "HTTP Handler",
NS_HTTPPROTOCOLHANDLER_CID,
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http",
@@ -832,29 +852,36 @@ static const nsModuleComponentInfo gNetModuleInfo[] = {
NS_HTTPAUTHMANAGER_CID,
NS_HTTPAUTHMANAGER_CONTRACTID,
nsHttpAuthManagerConstructor },
#endif // !NECKO_PROTOCOL_http
#ifdef NECKO_PROTOCOL_ftp
// from netwerk/protocol/ftp:
{ NS_FTPPROTOCOLHANDLER_CLASSNAME,
NS_FTPPROTOCOLHANDLER_CID,
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "ftp",
nsFtpProtocolHandlerConstructor
},
#endif
#ifdef NECKO_PROTOCOL_jar
// from netwerk/protocol/jar:
{ NS_JARPROTOCOLHANDLER_CLASSNAME,
NS_JARPROTOCOLHANDLER_CID,
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "jar",
nsJARProtocolHandlerConstructor
},
#endif
#ifdef NECKO_PROTOCOL_res
// from netwerk/protocol/res:
{ NS_RESPROTOCOLHANDLER_CLASSNAME,
NS_RESPROTOCOLHANDLER_CID,
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "resource",
nsResProtocolHandlerConstructor
},
#endif
// from netwerk/protocol/about:
// from netwerk/protocol/about (about:blank is mandatory):
{ "About Protocol Handler",
NS_ABOUTPROTOCOLHANDLER_CID,
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "about",
@@ -865,6 +892,7 @@ static const nsModuleComponentInfo gNetModuleInfo[] = {
NS_ABOUT_MODULE_CONTRACTID_PREFIX "blank",
nsAboutBlank::Create
},
#ifdef NECKO_PROTOCOL_about
{ "about:bloat",
NS_ABOUT_BLOAT_MODULE_CID,
NS_ABOUT_MODULE_CONTRACTID_PREFIX "bloat",
@@ -911,6 +939,7 @@ static const nsModuleComponentInfo gNetModuleInfo[] = {
NS_ABOUT_MODULE_CONTRACTID_PREFIX "cache-entry",
nsAboutCacheEntryConstructor
},
#endif
{ NS_ISOCKSSOCKETPROVIDER_CLASSNAME,
NS_SOCKSSOCKETPROVIDER_CID,