LCOV - app.info - netwerk/build/nsNetModule.cpp

LCOV - code coverage report
| Current view: | directory - netwerk/build - nsNetModule.cpp (source / functions) |  | Found | Hit | Coverage |
| Test: | app.info | Lines: | 198 | 116 | 58.6 %
| Date: | 2012-07-07 | Functions: | 69 | 52 | 75.4 %

           1                 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
           2                 : /* ***** BEGIN LICENSE BLOCK *****
           3                 :  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
           4                 :  *
           5                 :  * The contents of this file are subject to the Mozilla Public License Version
           6                 :  * 1.1 (the "License"); you may not use this file except in compliance with
           7                 :  * the License. You may obtain a copy of the License at
           8                 :  * http://www.mozilla.org/MPL/
           9                 :  *
          10                 :  * Software distributed under the License is distributed on an "AS IS" basis,
          11                 :  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
          12                 :  * for the specific language governing rights and limitations under the
          13                 :  * License.
          14                 :  *
          15                 :  * The Original Code is mozilla.org code.
          16                 :  *
          17                 :  * The Initial Developer of the Original Code is
          18                 :  * Netscape Communications Corporation.
          19                 :  * Portions created by the Initial Developer are Copyright (C) 1998
          20                 :  * the Initial Developer. All Rights Reserved.
          21                 :  *
          22                 :  * Contributor(s):
          23                 :  *
          24                 :  * Alternatively, the contents of this file may be used under the terms of
          25                 :  * either the GNU General Public License Version 2 or later (the "GPL"), or
          26                 :  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
          27                 :  * in which case the provisions of the GPL or the LGPL are applicable instead
          28                 :  * of those above. If you wish to allow use of your version of this file only
          29                 :  * under the terms of either the GPL or the LGPL, and not to allow others to
          30                 :  * use your version of this file under the terms of the MPL, indicate your
          31                 :  * decision by deleting the provisions above and replace them with the notice
          32                 :  * and other provisions required by the GPL or the LGPL. If you do not delete
          33                 :  * the provisions above, a recipient may use your version of this file under
          34                 :  * the terms of any one of the MPL, the GPL or the LGPL.
          35                 :  *
          36                 :  * ***** END LICENSE BLOCK ***** */
          37                 :
          38                 : #include "necko-config.h"
          39                 :
          40                 : #define ALLOW_LATE_NSHTTP_H_INCLUDE 1
          41                 : #include "base/basictypes.h"
          42                 :
          43                 : #include "nsCOMPtr.h"
          44                 : #include "nsIClassInfoImpl.h"
          45                 : #include "mozilla/ModuleUtils.h"
          46                 : #include "nsIComponentManager.h"
          47                 : #include "nsIServiceManager.h"
          48                 : #include "nsICategoryManager.h"
          49                 : #include "nsSocketProviderService.h"
          50                 : #include "nscore.h"
          51                 : #include "nsSimpleURI.h"
          52                 : #include "nsSimpleNestedURI.h"
          53                 : #include "nsLoadGroup.h"
          54                 : #include "nsStreamLoader.h"
          55                 : #include "nsUnicharStreamLoader.h"
          56                 : #include "nsFileStreams.h"
          57                 : #include "nsBufferedStreams.h"
          58                 : #include "nsMIMEInputStream.h"
          59                 : #include "nsSOCKSSocketProvider.h"
          60                 : #include "nsCacheService.h"
          61                 : #include "nsDiskCacheDeviceSQL.h"
          62                 : #include "nsApplicationCache.h"
          63                 : #include "nsMimeTypes.h"
          64                 : #include "nsNetStrings.h"
          65                 : #include "nsDNSPrefetch.h"
          66                 : #include "nsAboutProtocolHandler.h"
          67                 : #include "nsXULAppAPI.h"
          68                 :
          69                 : #include "nsNetCID.h"
          70                 :
          71                 : #if defined(XP_MACOSX)
          72                 : #if !defined(__LP64__)
          73                 : #define BUILD_APPLEFILE_DECODER 1
          74                 : #endif
          75                 : #else
          76                 : #define BUILD_BINHEX_DECODER 1
          77                 : #endif
          78                 :
          79                 : ///////////////////////////////////////////////////////////////////////////////
          80                 :
          81                 : #include "nsIOService.h"
          82            1465 : NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIOService, nsIOService::GetInstance)
          83                 :
          84                 : #include "nsDNSService2.h"
          85            2838 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsDNSService, Init)
          86                 :
          87                 : #include "nsProtocolProxyService.h"
          88             556 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsProtocolProxyService, Init)
          89                 :
          90                 : #include "nsStreamTransportService.h"
          91             166 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsStreamTransportService, Init)
          92                 :
          93                 : #include "nsSocketTransportService2.h"
          94                 : #undef LOG
          95                 : #undef LOG_ENABLED
          96            2838 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSocketTransportService, Init)
          97                 :
          98                 : #include "nsServerSocket.h"
          99             842 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsServerSocket)
         100                 :
         101                 : #include "nsUDPSocketProvider.h"
         102               0 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsUDPSocketProvider)
         103                 :
         104                 : #include "nsAsyncStreamCopier.h"
         105             790 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsAsyncStreamCopier)
         106                 :
         107                 : #include "nsInputStreamPump.h"
         108             206 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsInputStreamPump)
         109                 :
         110                 : #include "nsInputStreamChannel.h"
         111            6292 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsInputStreamChannel, Init)
         112                 :
         113                 : #include "nsDownloader.h"
         114               4 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsDownloader)
         115                 :
         116                 : #include "nsSyncStreamListener.h"
         117              36 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSyncStreamListener, Init)
         118                 :
         119            2466 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsSafeFileOutputStream)
         120                 :
         121            2816 : NS_GENERIC_AGGREGATED_CONSTRUCTOR_INIT(nsLoadGroup, Init)
         122                 :
         123                 : #include "nsEffectiveTLDService.h"
         124             604 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsEffectiveTLDService, Init)
         125                 :
         126                 : #include "nsSerializationHelper.h"
         127               0 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsSerializationHelper)
         128                 :
         129                 : #include "RedirectChannelRegistrar.h"
         130                 : typedef mozilla::net::RedirectChannelRegistrar RedirectChannelRegistrar;
         131               0 : NS_GENERIC_FACTORY_CONSTRUCTOR(RedirectChannelRegistrar)
         132                 :
         133                 : ///////////////////////////////////////////////////////////////////////////////
         134                 :
         135                 : extern nsresult
         136                 : net_NewIncrementalDownload(nsISupports *, const nsIID &, void **);
         137                 :
         138                 : #define NS_INCREMENTALDOWNLOAD_CLASSNAME \
         139                 :     "nsIncrementalDownload"
         140                 : #define NS_INCREMENTALDOWNLOAD_CID \
         141                 : { /* a62af1ba-79b3-4896-8aaf-b148bfce4280 */         \
         142                 :     0xa62af1ba,                                      \
         143                 :     0x79b3,                                          \
         144                 :     0x4896,                                          \
         145                 :     {0x8a, 0xaf, 0xb1, 0x48, 0xbf, 0xce, 0x42, 0x80} \
         146                 : }
         147                 :
         148                 : ///////////////////////////////////////////////////////////////////////////////
         149                 :
         150                 : #include "nsStreamConverterService.h"
         151                 :
         152                 : #ifdef BUILD_APPLEFILE_DECODER
         153                 : #include "nsAppleFileDecoder.h"
         154                 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppleFileDecoder)
         155                 : #endif
         156                 :
         157                 : ///////////////////////////////////////////////////////////////////////////////
         158                 :
         159                 : #include "nsMIMEHeaderParamImpl.h"
         160                 :
         161              14 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsMIMEHeaderParamImpl)
         162                 : ///////////////////////////////////////////////////////////////////////////////
         163                 :
         164                 : #include "nsRequestObserverProxy.h"
         165                 : #include "nsSimpleStreamListener.h"
         166                 : #include "nsDirIndexParser.h"
         167                 : #include "nsDirIndex.h"
         168                 :
         169             790 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsRequestObserverProxy)
         170           11504 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsSimpleStreamListener)
         171               0 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsDirIndexParser, Init)
         172               0 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsDirIndex)
         173                 :
         174                 : ///////////////////////////////////////////////////////////////////////////////
         175                 :
         176                 : #include "nsStreamListenerTee.h"
         177            2814 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsStreamListenerTee)
         178                 :
         179                 : ///////////////////////////////////////////////////////////////////////////////
         180                 :
         181                 : #ifdef NECKO_COOKIES
         182                 : #include "nsCookieService.h"
         183             310 : NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsICookieService,
         184             310 :   nsCookieService::GetXPCOMSingleton)
         185                 : #endif
         186                 :
         187                 : ///////////////////////////////////////////////////////////////////////////////
         188                 : #ifdef NECKO_WIFI
         189                 :
         190                 : #include "nsWifiMonitor.h"
         191                 : #undef LOG
         192                 : #undef LOG_ENABLED
         193               2 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsWifiMonitor)
         194                 :
         195                 : #endif
         196                 :
         197                 : ///////////////////////////////////////////////////////////////////////////////
         198                 : // protocols
         199                 : ///////////////////////////////////////////////////////////////////////////////
         200                 :
         201                 : // about:blank is mandatory
         202                 : #include "nsAboutProtocolHandler.h"
         203                 : #include "nsAboutBlank.h"
         204             224 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsAboutProtocolHandler)
         205             200 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsSafeAboutProtocolHandler)
         206               2 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsNestedAboutURI)
         207                 :
         208                 : #ifdef NECKO_PROTOCOL_about
         209                 : // about
         210                 : #ifdef NS_BUILD_REFCNT_LOGGING
         211                 : #include "nsAboutBloat.h"
         212                 : #endif
         213                 : #include "nsAboutCache.h"
         214                 : #include "nsAboutCacheEntry.h"
         215               0 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsAboutCacheEntry)
         216                 : #endif
         217                 :
         218               8 : NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsOfflineCacheDevice, nsOfflineCacheDevice::GetInstance)
         219              16 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsApplicationCacheNamespace)
         220               0 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsApplicationCache)
         221                 :
         222                 : #ifdef NECKO_PROTOCOL_file
         223                 : // file
         224                 : #include "nsFileProtocolHandler.h"
         225            2838 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFileProtocolHandler, Init)
         226                 : #endif
         227                 :
         228                 : #ifdef NECKO_PROTOCOL_ftp
         229                 : // ftp
         230                 : #include "nsFtpProtocolHandler.h"
         231              36 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFtpProtocolHandler, Init)
         232                 : #endif
         233                 :
         234                 : #ifdef NECKO_PROTOCOL_http
         235                 : // http/https
         236                 : #include "nsHttpHandler.h"
         237                 : #undef LOG
         238                 : #undef LOG_ENABLED
         239                 : #include "nsHttpAuthManager.h"
         240                 : #include "nsHttpChannelAuthProvider.h"
         241                 : #include "nsHttpBasicAuth.h"
         242                 : #include "nsHttpDigestAuth.h"
         243                 : #include "nsHttpNTLMAuth.h"
         244                 : #include "nsHttpActivityDistributor.h"
         245               2 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpNTLMAuth)
         246                 : #undef LOG
         247                 : #undef LOG_ENABLED
         248            1358 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHttpHandler, Init)
         249              78 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHttpsHandler, Init)
         250              72 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHttpAuthManager, Init)
         251            7026 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpChannelAuthProvider)
         252             526 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpActivityDistributor)
         253              12 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpBasicAuth)
         254               2 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpDigestAuth)
         255                 : #endif // !NECKO_PROTOCOL_http
         256                 :
         257                 : #ifdef NECKO_PROTOCOL_res
         258                 : // resource
         259                 : #include "nsResProtocolHandler.h"
         260            2838 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsResProtocolHandler, Init)
         261               0 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsResURL)
         262                 : #endif
         263                 :
         264                 : #ifdef NECKO_PROTOCOL_device
         265                 : #include "nsDeviceProtocolHandler.h"
         266               0 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceProtocolHandler)
         267                 : #ifdef MOZ_WIDGET_GONK
         268                 : #include "nsB2GProtocolHandler.h"
         269                 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsB2GProtocolHandler)
         270                 : #endif
         271                 : #endif
         272                 :
         273                 : #ifdef NECKO_PROTOCOL_viewsource
         274                 : #include "nsViewSourceHandler.h"
         275              10 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsViewSourceHandler)
         276                 : #endif
         277                 :
         278                 : #ifdef NECKO_PROTOCOL_data
         279                 : #include "nsDataHandler.h"
         280                 : #endif
         281                 :
         282                 : #ifdef NECKO_PROTOCOL_wyciwyg
         283                 : #include "nsWyciwygProtocolHandler.h"
         284               8 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsWyciwygProtocolHandler)
         285                 : #endif
         286                 :
         287                 : #ifdef NECKO_PROTOCOL_websocket
         288                 : #include "WebSocketChannel.h"
         289                 : #include "WebSocketChannelChild.h"
         290                 : namespace mozilla {
         291                 : namespace net {
         292                 : static BaseWebSocketChannel*
         293               0 : WebSocketChannelConstructor(bool aSecure)
         294                 : {
         295               0 :   if (IsNeckoChild()) {
         296               0 :     return new WebSocketChannelChild(aSecure);
         297                 :   }
         298                 :
         299               0 :   if (aSecure) {
         300               0 :     return new WebSocketSSLChannel;
         301                 :   } else {
         302               0 :     return new WebSocketChannel;
         303                 :   }
         304                 : }
         305                 :
         306                 : #define WEB_SOCKET_HANDLER_CONSTRUCTOR(type, secure)  \
         307                 : static nsresult                                       \
         308                 : type##Constructor(nsISupports *aOuter, REFNSIID aIID, \
         309                 :                   void **aResult)                     \
         310                 : {                                                     \
         311                 :   nsresult rv;                                        \
         312                 :                                                       \
         313                 :   BaseWebSocketChannel * inst;                        \
         314                 :                                                       \
         315                 :   *aResult = NULL;                                    \
         316                 :   if (NULL != aOuter) {                               \
         317                 :     rv = NS_ERROR_NO_AGGREGATION;                     \
         318                 :     return rv;                                        \
         319                 :   }                                                   \
         320                 :   inst = WebSocketChannelConstructor(secure);         \
         321                 :   NS_ADDREF(inst);                                    \
         322                 :   rv = inst->QueryInterface(aIID, aResult);           \
         323                 :   NS_RELEASE(inst);                                   \
         324                 :   return rv;                                          \
         325                 : }
         326                 :
         327               0 : WEB_SOCKET_HANDLER_CONSTRUCTOR(WebSocketChannel, false)
         328               0 : WEB_SOCKET_HANDLER_CONSTRUCTOR(WebSocketSSLChannel, true)
         329                 : #undef WEB_SOCKET_HANDLER_CONSTRUCTOR
         330                 : } // namespace mozilla::net
         331                 : } // namespace mozilla
         332                 : #endif
         333                 :
         334                 : ///////////////////////////////////////////////////////////////////////////////
         335                 :
         336                 : #include "nsURIChecker.h"
         337               0 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsURIChecker)
         338                 :
         339                 : ///////////////////////////////////////////////////////////////////////////////
         340                 :
         341                 : #include "nsURLParsers.h"
         342            2838 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsNoAuthURLParser)
         343            2838 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsAuthURLParser)
         344            2838 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsStdURLParser)
         345                 :
         346                 : #include "nsStandardURL.h"
         347           98764 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsStandardURL)
         348                 :
         349            4794 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsSimpleURI)
         350                 :
         351               0 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsSimpleNestedURI)
         352                 :
         353                 : ///////////////////////////////////////////////////////////////////////////////
         354                 :
         355                 : #include "nsIDNService.h"
         356            2838 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsIDNService, Init)
         357                 :
         358                 : ///////////////////////////////////////////////////////////////////////////////
         359                 : #if defined(XP_WIN)
         360                 : #include "nsNotifyAddrListener.h"
         361                 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNotifyAddrListener, Init)
         362                 : #elif defined(MOZ_WIDGET_COCOA)
         363                 : #include "nsNetworkLinkService.h"
         364                 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNetworkLinkService, Init)
         365                 : #elif defined(MOZ_ENABLE_LIBCONIC)
         366                 : #include "nsMaemoNetworkLinkService.h"
         367                 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMaemoNetworkLinkService, Init)
         368                 : #elif defined(MOZ_ENABLE_QTNETWORK)
         369                 : #include "nsQtNetworkLinkService.h"
         370                 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsQtNetworkLinkService, Init)
         371                 : #elif defined(MOZ_WIDGET_ANDROID)
         372                 : #include "nsAndroidNetworkLinkService.h"
         373                 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsAndroidNetworkLinkService)
         374                 : #endif
         375                 :
         376                 : ///////////////////////////////////////////////////////////////////////////////
         377                 :
         378                 : #ifdef NECKO_PROTOCOL_ftp
         379                 : #include "nsFTPDirListingConv.h"
         380                 : nsresult NS_NewFTPDirListingConv(nsFTPDirListingConv** result);
         381                 : #endif
         382                 :
         383                 : #include "nsMultiMixedConv.h"
         384                 : #include "nsHTTPCompressConv.h"
         385                 : #include "mozTXTToHTMLConv.h"
         386                 : #include "nsUnknownDecoder.h"
         387                 : #include "nsTXTToHTMLConv.h"
         388                 : #include "nsIndexedToHTML.h"
         389                 : #ifdef BUILD_BINHEX_DECODER
         390                 : #include "nsBinHexDecoder.h"
         391                 : #endif
         392                 :
         393                 : nsresult NS_NewMultiMixedConv (nsMultiMixedConv** result);
         394                 : nsresult MOZ_NewTXTToHTMLConv (mozTXTToHTMLConv** result);
         395                 : nsresult NS_NewHTTPCompressConv  (nsHTTPCompressConv ** result);
         396                 : nsresult NS_NewNSTXTToHTMLConv(nsTXTToHTMLConv** result);
         397                 : nsresult NS_NewStreamConv(nsStreamConverterService **aStreamConv);
         398                 :
         399                 : #define FTP_TO_INDEX                 "?from=text/ftp-dir&to=application/http-index-format"
         400                 : #define INDEX_TO_HTML                "?from=application/http-index-format&to=text/html"
         401                 : #define MULTI_MIXED_X                "?from=multipart/x-mixed-replace&to=*/*"
         402                 : #define MULTI_MIXED                  "?from=multipart/mixed&to=*/*"
         403                 : #define MULTI_BYTERANGES             "?from=multipart/byteranges&to=*/*"
         404                 : #define UNKNOWN_CONTENT              "?from=" UNKNOWN_CONTENT_TYPE "&to=*/*"
         405                 : #define GZIP_TO_UNCOMPRESSED         "?from=gzip&to=uncompressed"
         406                 : #define XGZIP_TO_UNCOMPRESSED        "?from=x-gzip&to=uncompressed"
         407                 : #define COMPRESS_TO_UNCOMPRESSED     "?from=compress&to=uncompressed"
         408                 : #define XCOMPRESS_TO_UNCOMPRESSED    "?from=x-compress&to=uncompressed"
         409                 : #define DEFLATE_TO_UNCOMPRESSED      "?from=deflate&to=uncompressed"
         410                 : #define PLAIN_TO_HTML                "?from=text/plain&to=text/html"
         411                 :
         412                 : #ifdef BUILD_BINHEX_DECODER
         413                 : #define BINHEX_TO_WILD               "?from=application/mac-binhex40&to=*/*"
         414                 : #endif
         415                 :
         416                 : static const mozilla::Module::CategoryEntry kNeckoCategories[] = {
         417                 :     { NS_ISTREAMCONVERTER_KEY, FTP_TO_INDEX, "" },
         418                 :     { NS_ISTREAMCONVERTER_KEY, INDEX_TO_HTML, "" },
         419                 :     { NS_ISTREAMCONVERTER_KEY, MULTI_MIXED_X, "" },
         420                 :     { NS_ISTREAMCONVERTER_KEY, MULTI_MIXED, "" },
         421                 :     { NS_ISTREAMCONVERTER_KEY, MULTI_BYTERANGES, "" },
         422                 :     { NS_ISTREAMCONVERTER_KEY, UNKNOWN_CONTENT, "" },
         423                 :     { NS_ISTREAMCONVERTER_KEY, GZIP_TO_UNCOMPRESSED, "" },
         424                 :     { NS_ISTREAMCONVERTER_KEY, XGZIP_TO_UNCOMPRESSED, "" },
         425                 :     { NS_ISTREAMCONVERTER_KEY, COMPRESS_TO_UNCOMPRESSED, "" },
         426                 :     { NS_ISTREAMCONVERTER_KEY, XCOMPRESS_TO_UNCOMPRESSED, "" },
         427                 :     { NS_ISTREAMCONVERTER_KEY, DEFLATE_TO_UNCOMPRESSED, "" },
         428                 : #ifdef BUILD_BINHEX_DECODER
         429                 :     { NS_ISTREAMCONVERTER_KEY, BINHEX_TO_WILD, "" },
         430                 : #endif
         431                 :     { NS_ISTREAMCONVERTER_KEY, PLAIN_TO_HTML, "" },
         432                 :     NS_BINARYDETECTOR_CATEGORYENTRY,
         433                 :     { NULL }
         434                 : };
         435                 :
         436                 : #ifdef BUILD_BINHEX_DECODER
         437               0 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsBinHexDecoder)
         438                 : #endif
         439                 :
         440                 : static nsresult
         441              80 : CreateNewStreamConvServiceFactory(nsISupports* aOuter, REFNSIID aIID, void **aResult)
         442                 : {
         443              80 :     if (!aResult) {
         444               0 :         return NS_ERROR_INVALID_POINTER;
         445                 :     }
         446              80 :     if (aOuter) {
         447               0 :         *aResult = nsnull;
         448               0 :         return NS_ERROR_NO_AGGREGATION;
         449                 :     }
         450              80 :     nsStreamConverterService* inst = nsnull;
         451              80 :     nsresult rv = NS_NewStreamConv(&inst);
         452              80 :     if (NS_FAILED(rv)) {
         453               0 :         *aResult = nsnull;
         454               0 :         return rv;
         455                 :     }
         456              80 :     rv = inst->QueryInterface(aIID, aResult);
         457              80 :     if (NS_FAILED(rv)) {
         458               0 :         *aResult = nsnull;
         459                 :     }
         460              80 :     NS_RELEASE(inst);             /* get rid of extra refcnt */
         461              80 :     return rv;
         462                 : }
         463                 :
         464                 : #ifdef NECKO_PROTOCOL_ftp
         465                 : static nsresult
         466              17 : CreateNewFTPDirListingConv(nsISupports* aOuter, REFNSIID aIID, void **aResult)
         467                 : {
         468              17 :     if (!aResult) {
         469               0 :         return NS_ERROR_INVALID_POINTER;
         470                 :     }
         471              17 :     if (aOuter) {
         472               0 :         *aResult = nsnull;
         473               0 :         return NS_ERROR_NO_AGGREGATION;
         474                 :     }
         475              17 :     nsFTPDirListingConv* inst = nsnull;
         476              17 :     nsresult rv = NS_NewFTPDirListingConv(&inst);
         477              17 :     if (NS_FAILED(rv)) {
         478               0 :         *aResult = nsnull;
         479               0 :         return rv;
         480                 :     }
         481              17 :     rv = inst->QueryInterface(aIID, aResult);
         482              17 :     if (NS_FAILED(rv)) {
         483               0 :         *aResult = nsnull;
         484                 :     }
         485              17 :     NS_RELEASE(inst);             /* get rid of extra refcnt */
         486              17 :     return rv;
         487                 : }
         488                 : #endif
         489                 :
         490                 : static nsresult
         491               2 : CreateNewMultiMixedConvFactory(nsISupports* aOuter, REFNSIID aIID, void **aResult)
         492                 : {
         493               2 :     if (!aResult) {
         494               0 :         return NS_ERROR_INVALID_POINTER;
         495                 :     }
         496               2 :     if (aOuter) {
         497               0 :         *aResult = nsnull;
         498               0 :         return NS_ERROR_NO_AGGREGATION;
         499                 :     }
         500               2 :     nsMultiMixedConv* inst = nsnull;
         501               2 :     nsresult rv = NS_NewMultiMixedConv(&inst);
         502               2 :     if (NS_FAILED(rv)) {
         503               0 :         *aResult = nsnull;
         504               0 :         return rv;
         505                 :     }
         506               2 :     rv = inst->QueryInterface(aIID, aResult);
         507               2 :     if (NS_FAILED(rv)) {
         508               0 :         *aResult = nsnull;
         509                 :     }
         510               2 :     NS_RELEASE(inst);             /* get rid of extra refcnt */
         511               2 :     return rv;
         512                 : }
         513                 :
         514                 : static nsresult
         515               0 : CreateNewTXTToHTMLConvFactory(nsISupports* aOuter, REFNSIID aIID, void **aResult)
         516                 : {
         517               0 :     if (!aResult) {
         518               0 :         return NS_ERROR_INVALID_POINTER;
         519                 :     }
         520               0 :     if (aOuter) {
         521               0 :         *aResult = nsnull;
         522               0 :         return NS_ERROR_NO_AGGREGATION;
         523                 :     }
         524               0 :     mozTXTToHTMLConv* inst = nsnull;
         525               0 :     nsresult rv = MOZ_NewTXTToHTMLConv(&inst);
         526               0 :     if (NS_FAILED(rv)) {
         527               0 :         *aResult = nsnull;
         528               0 :         return rv;
         529                 :     }
         530               0 :     rv = inst->QueryInterface(aIID, aResult);
         531               0 :     if (NS_FAILED(rv)) {
         532               0 :         *aResult = nsnull;
         533                 :     }
         534               0 :     NS_RELEASE(inst);             /* get rid of extra refcnt */
         535               0 :     return rv;
         536                 : }
         537                 :
         538                 : static nsresult
         539               6 : CreateNewHTTPCompressConvFactory (nsISupports* aOuter, REFNSIID aIID, void **aResult)
         540                 : {
         541               6 :     if (!aResult) {
         542               0 :         return NS_ERROR_INVALID_POINTER;
         543                 :     }
         544               6 :     if (aOuter) {
         545               0 :         *aResult = nsnull;
         546               0 :         return NS_ERROR_NO_AGGREGATION;
         547                 :     }
         548               6 :     nsHTTPCompressConv* inst = nsnull;
         549               6 :     nsresult rv = NS_NewHTTPCompressConv (&inst);
         550               6 :     if (NS_FAILED(rv)) {
         551               0 :         *aResult = nsnull;
         552               0 :         return rv;
         553                 :     }
         554               6 :     rv = inst->QueryInterface(aIID, aResult);
         555               6 :     if (NS_FAILED(rv)) {
         556               0 :         *aResult = nsnull;
         557                 :     }
         558               6 :     NS_RELEASE(inst);             /* get rid of extra refcnt */
         559               6 :     return rv;
         560                 : }
         561                 :
         562                 : static nsresult
         563             901 : CreateNewUnknownDecoderFactory(nsISupports *aOuter, REFNSIID aIID, void **aResult)
         564                 : {
         565                 :   nsresult rv;
         566                 :
         567             901 :   if (!aResult) {
         568               0 :     return NS_ERROR_NULL_POINTER;
         569                 :   }
         570             901 :   *aResult = nsnull;
         571                 :
         572             901 :   if (aOuter) {
         573               0 :     return NS_ERROR_NO_AGGREGATION;
         574                 :   }
         575                 :
         576                 :   nsUnknownDecoder *inst;
         577                 :
         578             901 :   inst = new nsUnknownDecoder();
         579             901 :   if (!inst) {
         580               0 :     return NS_ERROR_OUT_OF_MEMORY;
         581                 :   }
         582             901 :   NS_ADDREF(inst);
         583             901 :   rv = inst->QueryInterface(aIID, aResult);
         584             901 :   NS_RELEASE(inst);
         585                 :
         586             901 :   return rv;
         587                 : }
         588                 :
         589                 : static nsresult
         590               1 : CreateNewBinaryDetectorFactory(nsISupports *aOuter, REFNSIID aIID, void **aResult)
         591                 : {
         592                 :   nsresult rv;
         593                 :
         594               1 :   if (!aResult) {
         595               0 :     return NS_ERROR_NULL_POINTER;
         596                 :   }
         597               1 :   *aResult = nsnull;
         598                 :
         599               1 :   if (aOuter) {
         600               0 :     return NS_ERROR_NO_AGGREGATION;
         601                 :   }
         602                 :
         603               1 :   nsBinaryDetector* inst = new nsBinaryDetector();
         604               1 :   if (!inst) {
         605               0 :     return NS_ERROR_OUT_OF_MEMORY;
         606                 :   }
         607               1 :   NS_ADDREF(inst);
         608               1 :   rv = inst->QueryInterface(aIID, aResult);
         609               1 :   NS_RELEASE(inst);
         610                 :
         611               1 :   return rv;
         612                 : }
         613                 :
         614                 : static nsresult
         615               0 : CreateNewNSTXTToHTMLConvFactory(nsISupports *aOuter, REFNSIID aIID, void **aResult)
         616                 : {
         617                 :   nsresult rv;
         618                 :
         619               0 :   if (!aResult) {
         620               0 :     return NS_ERROR_NULL_POINTER;
         621                 :   }
         622               0 :   *aResult = nsnull;
         623                 :
         624               0 :   if (aOuter) {
         625               0 :     return NS_ERROR_NO_AGGREGATION;
         626                 :   }
         627                 :
         628                 :   nsTXTToHTMLConv *inst;
         629                 :
         630               0 :   inst = new nsTXTToHTMLConv();
         631               0 :   if (!inst) return NS_ERROR_OUT_OF_MEMORY;
         632                 :
         633               0 :   NS_ADDREF(inst);
         634               0 :   rv = inst->Init();
         635               0 :   if (NS_FAILED(rv)) {
         636               0 :     delete inst;
         637               0 :     return rv;
         638                 :   }
         639               0 :   rv = inst->QueryInterface(aIID, aResult);
         640               0 :   NS_RELEASE(inst);
         641                 :
         642               0 :   return rv;
         643                 : }
         644                 :
         645                 : ///////////////////////////////////////////////////////////////////////////////
         646                 : // Module implementation for the net library
         647                 :
         648                 : // Net module startup hook
         649            1419 : static nsresult nsNetStartup()
         650                 : {
         651            1419 :     gNetStrings = new nsNetStrings();
         652            1419 :     return gNetStrings ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
         653                 : }
         654                 :
         655                 :
         656                 : // Net module shutdown hook
         657            1419 : static void nsNetShutdown()
         658                 : {
         659                 :     // Release the url parser that the stdurl is holding.
         660            1419 :     nsStandardURL::ShutdownGlobalObjects();
         661                 :
         662                 :     // Release global state used by the URL helper module.
         663            1419 :     net_ShutdownURLHelper();
         664                 : #ifdef XP_MACOSX
         665                 :     net_ShutdownURLHelperOSX();
         666                 : #endif
         667                 :
         668                 :     // Release necko strings
         669            1419 :     delete gNetStrings;
         670            1419 :     gNetStrings = nsnull;
         671                 :
         672                 :     // Release DNS service reference.
         673            1419 :     nsDNSPrefetch::Shutdown();
         674                 :
         675                 : #ifdef NECKO_PROTOCOL_websocket
         676                 :     // Release the Websocket Admission Manager
         677            1419 :     mozilla::net::WebSocketChannel::Shutdown();
         678                 : #endif // NECKO_PROTOCOL_websocket
         679            1419 : }
         680                 :
         681                 : NS_DEFINE_NAMED_CID(NS_IOSERVICE_CID);
         682                 : NS_DEFINE_NAMED_CID(NS_STREAMTRANSPORTSERVICE_CID);
         683                 : NS_DEFINE_NAMED_CID(NS_SOCKETTRANSPORTSERVICE_CID);
         684                 : NS_DEFINE_NAMED_CID(NS_SERVERSOCKET_CID);
         685                 : NS_DEFINE_NAMED_CID(NS_SOCKETPROVIDERSERVICE_CID);
         686                 : NS_DEFINE_NAMED_CID(NS_DNSSERVICE_CID);
         687                 : NS_DEFINE_NAMED_CID(NS_IDNSERVICE_CID);
         688                 : NS_DEFINE_NAMED_CID(NS_EFFECTIVETLDSERVICE_CID);
         689                 : NS_DEFINE_NAMED_CID(NS_SIMPLEURI_CID);
         690                 : NS_DEFINE_NAMED_CID(NS_SIMPLENESTEDURI_CID);
         691                 : NS_DEFINE_NAMED_CID(NS_ASYNCSTREAMCOPIER_CID);
         692                 : NS_DEFINE_NAMED_CID(NS_INPUTSTREAMPUMP_CID);
         693                 : NS_DEFINE_NAMED_CID(NS_INPUTSTREAMCHANNEL_CID);
         694                 : NS_DEFINE_NAMED_CID(NS_STREAMLOADER_CID);
         695                 : NS_DEFINE_NAMED_CID(NS_UNICHARSTREAMLOADER_CID);
         696                 : NS_DEFINE_NAMED_CID(NS_DOWNLOADER_CID);
         697                 : NS_DEFINE_NAMED_CID(NS_SYNCSTREAMLISTENER_CID);
         698                 : NS_DEFINE_NAMED_CID(NS_REQUESTOBSERVERPROXY_CID);
         699                 : NS_DEFINE_NAMED_CID(NS_SIMPLESTREAMLISTENER_CID);
         700                 : NS_DEFINE_NAMED_CID(NS_STREAMLISTENERTEE_CID);
         701                 : NS_DEFINE_NAMED_CID(NS_LOADGROUP_CID);
         702                 : NS_DEFINE_NAMED_CID(NS_LOCALFILEINPUTSTREAM_CID);
         703                 : NS_DEFINE_NAMED_CID(NS_LOCALFILEOUTPUTSTREAM_CID);
         704                 : NS_DEFINE_NAMED_CID(NS_PARTIALLOCALFILEINPUTSTREAM_CID);
         705                 : NS_DEFINE_NAMED_CID(NS_SAFELOCALFILEOUTPUTSTREAM_CID);
         706                 : NS_DEFINE_NAMED_CID(NS_URICHECKER_CID);
         707                 : NS_DEFINE_NAMED_CID(NS_INCREMENTALDOWNLOAD_CID);
         708                 : NS_DEFINE_NAMED_CID(NS_STDURLPARSER_CID);
         709                 : NS_DEFINE_NAMED_CID(NS_NOAUTHURLPARSER_CID);
         710                 : NS_DEFINE_NAMED_CID(NS_AUTHURLPARSER_CID);
         711                 : NS_DEFINE_NAMED_CID(NS_STANDARDURL_CID);
         712                 : NS_DEFINE_NAMED_CID(NS_BUFFEREDINPUTSTREAM_CID);
         713                 : NS_DEFINE_NAMED_CID(NS_BUFFEREDOUTPUTSTREAM_CID);
         714                 : NS_DEFINE_NAMED_CID(NS_MIMEINPUTSTREAM_CID);
         715                 : NS_DEFINE_NAMED_CID(NS_PROTOCOLPROXYSERVICE_CID);
         716                 : NS_DEFINE_NAMED_CID(NS_STREAMCONVERTERSERVICE_CID);
         717                 : #ifdef BUILD_APPLEFILE_DECODER
         718                 : NS_DEFINE_NAMED_CID(NS_APPLEFILEDECODER_CID);
         719                 : #endif
         720                 : #ifdef NECKO_PROTOCOL_ftp
         721                 : NS_DEFINE_NAMED_CID(NS_FTPDIRLISTINGCONVERTER_CID);
         722                 : #endif
         723                 : NS_DEFINE_NAMED_CID(NS_NSINDEXEDTOHTMLCONVERTER_CID);
         724                 : NS_DEFINE_NAMED_CID(NS_DIRINDEXPARSER_CID);
         725                 : NS_DEFINE_NAMED_CID(NS_MULTIMIXEDCONVERTER_CID);
         726                 : NS_DEFINE_NAMED_CID(NS_UNKNOWNDECODER_CID);
         727                 : NS_DEFINE_NAMED_CID(NS_BINARYDETECTOR_CID);
         728                 : NS_DEFINE_NAMED_CID(NS_HTTPCOMPRESSCONVERTER_CID);
         729                 : NS_DEFINE_NAMED_CID(NS_NSTXTTOHTMLCONVERTER_CID);
         730                 : #ifdef BUILD_BINHEX_DECODER
         731                 : NS_DEFINE_NAMED_CID(NS_BINHEXDECODER_CID);
         732                 : #endif
         733                 : NS_DEFINE_NAMED_CID(MOZITXTTOHTMLCONV_CID);
         734                 : NS_DEFINE_NAMED_CID(NS_DIRINDEX_CID);
         735                 : NS_DEFINE_NAMED_CID(NS_MIMEHEADERPARAM_CID);
         736                 : #ifdef NECKO_PROTOCOL_file
         737                 : NS_DEFINE_NAMED_CID(NS_FILEPROTOCOLHANDLER_CID);
         738                 : #endif
         739                 : #ifdef NECKO_PROTOCOL_http
         740                 : NS_DEFINE_NAMED_CID(NS_HTTPPROTOCOLHANDLER_CID);
         741                 : NS_DEFINE_NAMED_CID(NS_HTTPSPROTOCOLHANDLER_CID);
         742                 : NS_DEFINE_NAMED_CID(NS_HTTPBASICAUTH_CID);
         743                 : NS_DEFINE_NAMED_CID(NS_HTTPDIGESTAUTH_CID);
         744                 : NS_DEFINE_NAMED_CID(NS_HTTPNTLMAUTH_CID);
         745                 : NS_DEFINE_NAMED_CID(NS_HTTPAUTHMANAGER_CID);
         746                 : NS_DEFINE_NAMED_CID(NS_HTTPCHANNELAUTHPROVIDER_CID);
         747                 : NS_DEFINE_NAMED_CID(NS_HTTPACTIVITYDISTRIBUTOR_CID);
         748                 : #endif // !NECKO_PROTOCOL_http
         749                 : #ifdef NECKO_PROTOCOL_ftp
         750                 : NS_DEFINE_NAMED_CID(NS_FTPPROTOCOLHANDLER_CID);
         751                 : #endif
         752                 : #ifdef NECKO_PROTOCOL_res
         753                 : NS_DEFINE_NAMED_CID(NS_RESPROTOCOLHANDLER_CID);
         754                 : NS_DEFINE_NAMED_CID(NS_RESURL_CID);
         755                 : #endif
         756                 : NS_DEFINE_NAMED_CID(NS_ABOUTPROTOCOLHANDLER_CID);
         757                 : NS_DEFINE_NAMED_CID(NS_SAFEABOUTPROTOCOLHANDLER_CID);
         758                 : NS_DEFINE_NAMED_CID(NS_ABOUT_BLANK_MODULE_CID);
         759                 : NS_DEFINE_NAMED_CID(NS_NESTEDABOUTURI_CID);
         760                 : #ifdef NECKO_PROTOCOL_about
         761                 : #ifdef NS_BUILD_REFCNT_LOGGING
         762                 : NS_DEFINE_NAMED_CID(NS_ABOUT_BLOAT_MODULE_CID);
         763                 : #endif
         764                 : NS_DEFINE_NAMED_CID(NS_ABOUT_CACHE_MODULE_CID);
         765                 : NS_DEFINE_NAMED_CID(NS_ABOUT_CACHE_ENTRY_MODULE_CID);
         766                 : #endif
         767                 : NS_DEFINE_NAMED_CID(NS_SOCKSSOCKETPROVIDER_CID);
         768                 : NS_DEFINE_NAMED_CID(NS_SOCKS4SOCKETPROVIDER_CID);
         769                 : NS_DEFINE_NAMED_CID(NS_UDPSOCKETPROVIDER_CID);
         770                 : NS_DEFINE_NAMED_CID(NS_CACHESERVICE_CID);
         771                 : NS_DEFINE_NAMED_CID(NS_APPLICATIONCACHESERVICE_CID);
         772                 : NS_DEFINE_NAMED_CID(NS_APPLICATIONCACHENAMESPACE_CID);
         773                 : NS_DEFINE_NAMED_CID(NS_APPLICATIONCACHE_CID);
         774                 : #ifdef NECKO_COOKIES
         775                 : NS_DEFINE_NAMED_CID(NS_COOKIEMANAGER_CID);
         776                 : NS_DEFINE_NAMED_CID(NS_COOKIESERVICE_CID);
         777                 : #endif
         778                 : #ifdef NECKO_WIFI
         779                 : NS_DEFINE_NAMED_CID(NS_WIFI_MONITOR_COMPONENT_CID);
         780                 : #endif
         781                 : #ifdef NECKO_PROTOCOL_data
         782                 : NS_DEFINE_NAMED_CID(NS_DATAPROTOCOLHANDLER_CID);
         783                 : #endif
         784                 : #ifdef NECKO_PROTOCOL_device
         785                 : NS_DEFINE_NAMED_CID(NS_DEVICEPROTOCOLHANDLER_CID);
         786                 : #ifdef MOZ_WIDGET_GONK
         787                 : NS_DEFINE_NAMED_CID(NS_B2GPROTOCOLHANDLER_CID);
         788                 : #endif
         789                 : #endif
         790                 : #ifdef NECKO_PROTOCOL_viewsource
         791                 : NS_DEFINE_NAMED_CID(NS_VIEWSOURCEHANDLER_CID);
         792                 : #endif
         793                 : #ifdef NECKO_PROTOCOL_wyciwyg
         794                 : NS_DEFINE_NAMED_CID(NS_WYCIWYGPROTOCOLHANDLER_CID);
         795                 : #endif
         796                 : #ifdef NECKO_PROTOCOL_websocket
         797                 : NS_DEFINE_NAMED_CID(NS_WEBSOCKETPROTOCOLHANDLER_CID);
         798                 : NS_DEFINE_NAMED_CID(NS_WEBSOCKETSSLPROTOCOLHANDLER_CID);
         799                 : #endif
         800                 : #if defined(XP_WIN)
         801                 : NS_DEFINE_NAMED_CID(NS_NETWORK_LINK_SERVICE_CID);
         802                 : #elif defined(MOZ_WIDGET_COCOA)
         803                 : NS_DEFINE_NAMED_CID(NS_NETWORK_LINK_SERVICE_CID);
         804                 : #elif defined(MOZ_ENABLE_LIBCONIC)
         805                 : NS_DEFINE_NAMED_CID(NS_NETWORK_LINK_SERVICE_CID);
         806                 : #elif defined(MOZ_ENABLE_QTNETWORK)
         807                 : NS_DEFINE_NAMED_CID(NS_NETWORK_LINK_SERVICE_CID);
         808                 : #elif defined(MOZ_WIDGET_ANDROID)
         809                 : NS_DEFINE_NAMED_CID(NS_NETWORK_LINK_SERVICE_CID);
         810                 : #endif
         811                 : NS_DEFINE_NAMED_CID(NS_SERIALIZATION_HELPER_CID);
         812                 : NS_DEFINE_NAMED_CID(NS_REDIRECTCHANNELREGISTRAR_CID);
         813                 :
         814                 : static const mozilla::Module::CIDEntry kNeckoCIDs[] = {
         815                 :     { &kNS_IOSERVICE_CID, false, NULL, nsIOServiceConstructor },
         816                 :     { &kNS_STREAMTRANSPORTSERVICE_CID, false, NULL, nsStreamTransportServiceConstructor },
         817                 :     { &kNS_SOCKETTRANSPORTSERVICE_CID, false, NULL, nsSocketTransportServiceConstructor },
         818                 :     { &kNS_SERVERSOCKET_CID, false, NULL, nsServerSocketConstructor },
         819                 :     { &kNS_SOCKETPROVIDERSERVICE_CID, false, NULL, nsSocketProviderService::Create },
         820                 :     { &kNS_DNSSERVICE_CID, false, NULL, nsDNSServiceConstructor },
         821                 :     { &kNS_IDNSERVICE_CID, false, NULL, nsIDNServiceConstructor },
         822                 :     { &kNS_EFFECTIVETLDSERVICE_CID, false, NULL, nsEffectiveTLDServiceConstructor },
         823                 :     { &kNS_SIMPLEURI_CID, false, NULL, nsSimpleURIConstructor },
         824                 :     { &kNS_SIMPLENESTEDURI_CID, false, NULL, nsSimpleNestedURIConstructor },
         825                 :     { &kNS_ASYNCSTREAMCOPIER_CID, false, NULL, nsAsyncStreamCopierConstructor },
         826                 :     { &kNS_INPUTSTREAMPUMP_CID, false, NULL, nsInputStreamPumpConstructor },
         827                 :     { &kNS_INPUTSTREAMCHANNEL_CID, false, NULL, nsInputStreamChannelConstructor },
         828                 :     { &kNS_STREAMLOADER_CID, false, NULL, nsStreamLoader::Create },
         829                 :     { &kNS_UNICHARSTREAMLOADER_CID, false, NULL, nsUnicharStreamLoader::Create },
         830                 :     { &kNS_DOWNLOADER_CID, false, NULL, nsDownloaderConstructor },
         831                 :     { &kNS_SYNCSTREAMLISTENER_CID, false, NULL, nsSyncStreamListenerConstructor },
         832                 :     { &kNS_REQUESTOBSERVERPROXY_CID, false, NULL, nsRequestObserverProxyConstructor },
         833                 :     { &kNS_SIMPLESTREAMLISTENER_CID, false, NULL, nsSimpleStreamListenerConstructor },
         834                 :     { &kNS_STREAMLISTENERTEE_CID, false, NULL, nsStreamListenerTeeConstructor },
         835                 :     { &kNS_LOADGROUP_CID, false, NULL, nsLoadGroupConstructor },
         836                 :     { &kNS_LOCALFILEINPUTSTREAM_CID, false, NULL, nsFileInputStream::Create },
         837                 :     { &kNS_LOCALFILEOUTPUTSTREAM_CID, false, NULL, nsFileOutputStream::Create },
         838                 :     { &kNS_PARTIALLOCALFILEINPUTSTREAM_CID, false, NULL, nsPartialFileInputStream::Create },
         839                 :     { &kNS_SAFELOCALFILEOUTPUTSTREAM_CID, false, NULL, nsSafeFileOutputStreamConstructor },
         840                 :     { &kNS_URICHECKER_CID, false, NULL, nsURICheckerConstructor },
         841                 :     { &kNS_INCREMENTALDOWNLOAD_CID, false, NULL, net_NewIncrementalDownload },
         842                 :     { &kNS_STDURLPARSER_CID, false, NULL, nsStdURLParserConstructor },
         843                 :     { &kNS_NOAUTHURLPARSER_CID, false, NULL, nsNoAuthURLParserConstructor },
         844                 :     { &kNS_AUTHURLPARSER_CID, false, NULL, nsAuthURLParserConstructor },
         845                 :     { &kNS_STANDARDURL_CID, false, NULL, nsStandardURLConstructor },
         846                 :     { &kNS_BUFFEREDINPUTSTREAM_CID, false, NULL, nsBufferedInputStream::Create },
         847                 :     { &kNS_BUFFEREDOUTPUTSTREAM_CID, false, NULL, nsBufferedOutputStream::Create },
         848                 :     { &kNS_MIMEINPUTSTREAM_CID, false, NULL, nsMIMEInputStreamConstructor },
         849                 :     { &kNS_PROTOCOLPROXYSERVICE_CID, true, NULL, nsProtocolProxyServiceConstructor },
         850                 :     { &kNS_STREAMCONVERTERSERVICE_CID, false, NULL, CreateNewStreamConvServiceFactory },
         851                 : #ifdef BUILD_APPLEFILE_DECODER
         852                 :     { &kNS_APPLEFILEDECODER_CID, false, NULL, nsAppleFileDecoderConstructor },
         853                 : #endif
         854                 : #ifdef NECKO_PROTOCOL_ftp
         855                 :     { &kNS_FTPDIRLISTINGCONVERTER_CID, false, NULL, CreateNewFTPDirListingConv },
         856                 : #endif
         857                 :     { &kNS_NSINDEXEDTOHTMLCONVERTER_CID, false, NULL, nsIndexedToHTML::Create },
         858                 :     { &kNS_DIRINDEXPARSER_CID, false, NULL, nsDirIndexParserConstructor },
         859                 :     { &kNS_MULTIMIXEDCONVERTER_CID, false, NULL, CreateNewMultiMixedConvFactory },
         860                 :     { &kNS_UNKNOWNDECODER_CID, false, NULL, CreateNewUnknownDecoderFactory },
         861                 :     { &kNS_BINARYDETECTOR_CID, false, NULL, CreateNewBinaryDetectorFactory },
         862                 :     { &kNS_HTTPCOMPRESSCONVERTER_CID, false, NULL, CreateNewHTTPCompressConvFactory },
         863                 :     { &kNS_NSTXTTOHTMLCONVERTER_CID, false, NULL, CreateNewNSTXTToHTMLConvFactory },
         864                 : #ifdef BUILD_BINHEX_DECODER
         865                 :     { &kNS_BINHEXDECODER_CID, false, NULL, nsBinHexDecoderConstructor },
         866                 : #endif
         867                 :     { &kMOZITXTTOHTMLCONV_CID, false, NULL, CreateNewTXTToHTMLConvFactory },
         868                 :     { &kNS_DIRINDEX_CID, false, NULL, nsDirIndexConstructor },
         869                 :     { &kNS_MIMEHEADERPARAM_CID, false, NULL, nsMIMEHeaderParamImplConstructor },
         870                 : #ifdef NECKO_PROTOCOL_file
         871                 :     { &kNS_FILEPROTOCOLHANDLER_CID, false, NULL, nsFileProtocolHandlerConstructor },
         872                 : #endif
         873                 : #ifdef NECKO_PROTOCOL_http
         874                 :     { &kNS_HTTPPROTOCOLHANDLER_CID, false, NULL, nsHttpHandlerConstructor },
         875                 :     { &kNS_HTTPSPROTOCOLHANDLER_CID, false, NULL, nsHttpsHandlerConstructor },
         876                 :     { &kNS_HTTPBASICAUTH_CID, false, NULL, nsHttpBasicAuthConstructor },
         877                 :     { &kNS_HTTPDIGESTAUTH_CID, false, NULL, nsHttpDigestAuthConstructor },
         878                 :     { &kNS_HTTPNTLMAUTH_CID, false, NULL, nsHttpNTLMAuthConstructor },
         879                 :     { &kNS_HTTPAUTHMANAGER_CID, false, NULL, nsHttpAuthManagerConstructor },
         880                 :     { &kNS_HTTPCHANNELAUTHPROVIDER_CID, false, NULL, nsHttpChannelAuthProviderConstructor },
         881                 :     { &kNS_HTTPACTIVITYDISTRIBUTOR_CID, false, NULL, nsHttpActivityDistributorConstructor },
         882                 : #endif // !NECKO_PROTOCOL_http
         883                 : #ifdef NECKO_PROTOCOL_ftp
         884                 :     { &kNS_FTPPROTOCOLHANDLER_CID, false, NULL, nsFtpProtocolHandlerConstructor },
         885                 : #endif
         886                 : #ifdef NECKO_PROTOCOL_res
         887                 :     { &kNS_RESPROTOCOLHANDLER_CID, false, NULL, nsResProtocolHandlerConstructor },
         888                 :     { &kNS_RESURL_CID, false, NULL, nsResURLConstructor },
         889                 : #endif
         890                 :     { &kNS_ABOUTPROTOCOLHANDLER_CID, false, NULL, nsAboutProtocolHandlerConstructor },
         891                 :     { &kNS_SAFEABOUTPROTOCOLHANDLER_CID, false, NULL, nsSafeAboutProtocolHandlerConstructor },
         892                 :     { &kNS_ABOUT_BLANK_MODULE_CID, false, NULL, nsAboutBlank::Create },
         893                 :     { &kNS_NESTEDABOUTURI_CID, false, NULL, nsNestedAboutURIConstructor },
         894                 : #ifdef NECKO_PROTOCOL_about
         895                 : #ifdef NS_BUILD_REFCNT_LOGGING
         896                 :     { &kNS_ABOUT_BLOAT_MODULE_CID, false, NULL, nsAboutBloat::Create },
         897                 : #endif
         898                 :     { &kNS_ABOUT_CACHE_MODULE_CID, false, NULL, nsAboutCache::Create },
         899                 :     { &kNS_ABOUT_CACHE_ENTRY_MODULE_CID, false, NULL, nsAboutCacheEntryConstructor },
         900                 : #endif
         901                 :     { &kNS_SOCKSSOCKETPROVIDER_CID, false, NULL, nsSOCKSSocketProvider::CreateV5 },
         902                 :     { &kNS_SOCKS4SOCKETPROVIDER_CID, false, NULL, nsSOCKSSocketProvider::CreateV4 },
         903                 :     { &kNS_UDPSOCKETPROVIDER_CID, false, NULL, nsUDPSocketProviderConstructor },
         904                 :     { &kNS_CACHESERVICE_CID, false, NULL, nsCacheService::Create },
         905                 :     { &kNS_APPLICATIONCACHESERVICE_CID, false, NULL, nsOfflineCacheDeviceConstructor },
         906                 :     { &kNS_APPLICATIONCACHENAMESPACE_CID, false, NULL, nsApplicationCacheNamespaceConstructor },
         907                 :     { &kNS_APPLICATIONCACHE_CID, false, NULL, nsApplicationCacheConstructor },
         908                 : #ifdef NECKO_COOKIES
         909                 :     { &kNS_COOKIEMANAGER_CID, false, NULL, nsICookieServiceConstructor },
         910                 :     { &kNS_COOKIESERVICE_CID, false, NULL, nsICookieServiceConstructor },
         911                 : #endif
         912                 : #ifdef NECKO_WIFI
         913                 :     { &kNS_WIFI_MONITOR_COMPONENT_CID, false, NULL, nsWifiMonitorConstructor },
         914                 : #endif
         915                 : #ifdef NECKO_PROTOCOL_data
         916                 :     { &kNS_DATAPROTOCOLHANDLER_CID, false, NULL, nsDataHandler::Create },
         917                 : #endif
         918                 : #ifdef NECKO_PROTOCOL_device
         919                 :     { &kNS_DEVICEPROTOCOLHANDLER_CID, false, NULL, nsDeviceProtocolHandlerConstructor},
         920                 : #ifdef MOZ_WIDGET_GONK
         921                 :     { &kNS_B2GPROTOCOLHANDLER_CID, false, NULL, nsB2GProtocolHandlerConstructor},
         922                 : #endif
         923                 : #endif
         924                 : #ifdef NECKO_PROTOCOL_viewsource
         925                 :     { &kNS_VIEWSOURCEHANDLER_CID, false, NULL, nsViewSourceHandlerConstructor },
         926                 : #endif
         927                 : #ifdef NECKO_PROTOCOL_wyciwyg
         928                 :     { &kNS_WYCIWYGPROTOCOLHANDLER_CID, false, NULL, nsWyciwygProtocolHandlerConstructor },
         929                 : #endif
         930                 : #ifdef NECKO_PROTOCOL_websocket
         931                 :     { &kNS_WEBSOCKETPROTOCOLHANDLER_CID, false, NULL,
         932                 :       mozilla::net::WebSocketChannelConstructor },
         933                 :     { &kNS_WEBSOCKETSSLPROTOCOLHANDLER_CID, false, NULL,
         934                 :       mozilla::net::WebSocketSSLChannelConstructor },
         935                 : #endif
         936                 : #if defined(XP_WIN)
         937                 :     { &kNS_NETWORK_LINK_SERVICE_CID, false, NULL, nsNotifyAddrListenerConstructor },
         938                 : #elif defined(MOZ_WIDGET_COCOA)
         939                 :     { &kNS_NETWORK_LINK_SERVICE_CID, false, NULL, nsNetworkLinkServiceConstructor },
         940                 : #elif defined(MOZ_ENABLE_LIBCONIC)
         941                 :     { &kNS_NETWORK_LINK_SERVICE_CID, false, NULL, nsMaemoNetworkLinkServiceConstructor },
         942                 : #elif defined(MOZ_ENABLE_QTNETWORK)
         943                 :     { &kNS_NETWORK_LINK_SERVICE_CID, false, NULL, nsQtNetworkLinkServiceConstructor },
         944                 : #elif defined(MOZ_WIDGET_ANDROID)
         945                 :     { &kNS_NETWORK_LINK_SERVICE_CID, false, NULL, nsAndroidNetworkLinkServiceConstructor },
         946                 : #endif
         947                 :     { &kNS_SERIALIZATION_HELPER_CID, false, NULL, nsSerializationHelperConstructor },
         948                 :     { &kNS_REDIRECTCHANNELREGISTRAR_CID, false, NULL, RedirectChannelRegistrarConstructor },
         949                 :     { NULL }
         950                 : };
         951                 :
         952                 : static const mozilla::Module::ContractIDEntry kNeckoContracts[] = {
         953                 :     { NS_IOSERVICE_CONTRACTID, &kNS_IOSERVICE_CID },
         954                 :     { NS_NETUTIL_CONTRACTID, &kNS_IOSERVICE_CID },
         955                 :     { NS_STREAMTRANSPORTSERVICE_CONTRACTID, &kNS_STREAMTRANSPORTSERVICE_CID },
         956                 :     { NS_SOCKETTRANSPORTSERVICE_CONTRACTID, &kNS_SOCKETTRANSPORTSERVICE_CID },
         957                 :     { NS_SERVERSOCKET_CONTRACTID, &kNS_SERVERSOCKET_CID },
         958                 :     { NS_SOCKETPROVIDERSERVICE_CONTRACTID, &kNS_SOCKETPROVIDERSERVICE_CID },
         959                 :     { NS_DNSSERVICE_CONTRACTID, &kNS_DNSSERVICE_CID },
         960                 :     { NS_IDNSERVICE_CONTRACTID, &kNS_IDNSERVICE_CID },
         961                 :     { NS_EFFECTIVETLDSERVICE_CONTRACTID, &kNS_EFFECTIVETLDSERVICE_CID },
         962                 :     { NS_SIMPLEURI_CONTRACTID, &kNS_SIMPLEURI_CID },
         963                 :     { NS_ASYNCSTREAMCOPIER_CONTRACTID, &kNS_ASYNCSTREAMCOPIER_CID },
         964                 :     { NS_INPUTSTREAMPUMP_CONTRACTID, &kNS_INPUTSTREAMPUMP_CID },
         965                 :     { NS_INPUTSTREAMCHANNEL_CONTRACTID, &kNS_INPUTSTREAMCHANNEL_CID },
         966                 :     { NS_STREAMLOADER_CONTRACTID, &kNS_STREAMLOADER_CID },
         967                 :     { NS_UNICHARSTREAMLOADER_CONTRACTID, &kNS_UNICHARSTREAMLOADER_CID },
         968                 :     { NS_DOWNLOADER_CONTRACTID, &kNS_DOWNLOADER_CID },
         969                 :     { NS_SYNCSTREAMLISTENER_CONTRACTID, &kNS_SYNCSTREAMLISTENER_CID },
         970                 :     { NS_REQUESTOBSERVERPROXY_CONTRACTID, &kNS_REQUESTOBSERVERPROXY_CID },
         971                 :     { NS_SIMPLESTREAMLISTENER_CONTRACTID, &kNS_SIMPLESTREAMLISTENER_CID },
         972                 :     { NS_STREAMLISTENERTEE_CONTRACTID, &kNS_STREAMLISTENERTEE_CID },
         973                 :     { NS_LOADGROUP_CONTRACTID, &kNS_LOADGROUP_CID },
         974                 :     { NS_LOCALFILEINPUTSTREAM_CONTRACTID, &kNS_LOCALFILEINPUTSTREAM_CID },
         975                 :     { NS_LOCALFILEOUTPUTSTREAM_CONTRACTID, &kNS_LOCALFILEOUTPUTSTREAM_CID },
         976                 :     { NS_PARTIALLOCALFILEINPUTSTREAM_CONTRACTID, &kNS_PARTIALLOCALFILEINPUTSTREAM_CID },
         977                 :     { NS_SAFELOCALFILEOUTPUTSTREAM_CONTRACTID, &kNS_SAFELOCALFILEOUTPUTSTREAM_CID },
         978                 :     { NS_URICHECKER_CONTRACT_ID, &kNS_URICHECKER_CID },
         979                 :     { NS_INCREMENTALDOWNLOAD_CONTRACTID, &kNS_INCREMENTALDOWNLOAD_CID },
         980                 :     { NS_STDURLPARSER_CONTRACTID, &kNS_STDURLPARSER_CID },
         981                 :     { NS_NOAUTHURLPARSER_CONTRACTID, &kNS_NOAUTHURLPARSER_CID },
         982                 :     { NS_AUTHURLPARSER_CONTRACTID, &kNS_AUTHURLPARSER_CID },
         983                 :     { NS_STANDARDURL_CONTRACTID, &kNS_STANDARDURL_CID },
         984                 :     { NS_BUFFEREDINPUTSTREAM_CONTRACTID, &kNS_BUFFEREDINPUTSTREAM_CID },
         985                 :     { NS_BUFFEREDOUTPUTSTREAM_CONTRACTID, &kNS_BUFFEREDOUTPUTSTREAM_CID },
         986                 :     { NS_MIMEINPUTSTREAM_CONTRACTID, &kNS_MIMEINPUTSTREAM_CID },
         987                 :     { NS_PROTOCOLPROXYSERVICE_CONTRACTID, &kNS_PROTOCOLPROXYSERVICE_CID },
         988                 :     { NS_STREAMCONVERTERSERVICE_CONTRACTID, &kNS_STREAMCONVERTERSERVICE_CID },
         989                 : #ifdef BUILD_APPLEFILE_DECODER
         990                 :     { NS_IAPPLEFILEDECODER_CONTRACTID, &kNS_APPLEFILEDECODER_CID },
         991                 : #endif
         992                 : #ifdef NECKO_PROTOCOL_ftp
         993                 :     { NS_ISTREAMCONVERTER_KEY FTP_TO_INDEX, &kNS_FTPDIRLISTINGCONVERTER_CID },
         994                 : #endif
         995                 :     { NS_ISTREAMCONVERTER_KEY INDEX_TO_HTML, &kNS_NSINDEXEDTOHTMLCONVERTER_CID },
         996                 :     { NS_DIRINDEXPARSER_CONTRACTID, &kNS_DIRINDEXPARSER_CID },
         997                 :     { NS_ISTREAMCONVERTER_KEY MULTI_MIXED_X, &kNS_MULTIMIXEDCONVERTER_CID },
         998                 :     { NS_ISTREAMCONVERTER_KEY MULTI_BYTERANGES, &kNS_MULTIMIXEDCONVERTER_CID },
         999                 :     { NS_ISTREAMCONVERTER_KEY MULTI_MIXED, &kNS_MULTIMIXEDCONVERTER_CID },
        1000                 :     { NS_ISTREAMCONVERTER_KEY UNKNOWN_CONTENT, &kNS_UNKNOWNDECODER_CID },
        1001                 :     { NS_GENERIC_CONTENT_SNIFFER, &kNS_UNKNOWNDECODER_CID },
        1002                 :     { NS_BINARYDETECTOR_CONTRACTID, &kNS_BINARYDETECTOR_CID },
        1003                 :     { NS_ISTREAMCONVERTER_KEY GZIP_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID },
        1004                 :     { NS_ISTREAMCONVERTER_KEY XGZIP_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID },
        1005                 :     { NS_ISTREAMCONVERTER_KEY COMPRESS_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID },
        1006                 :     { NS_ISTREAMCONVERTER_KEY XCOMPRESS_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID },
        1007                 :     { NS_ISTREAMCONVERTER_KEY DEFLATE_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID },
        1008                 :     { NS_ISTREAMCONVERTER_KEY PLAIN_TO_HTML, &kNS_NSTXTTOHTMLCONVERTER_CID },
        1009                 : #ifdef BUILD_BINHEX_DECODER
        1010                 :     { NS_ISTREAMCONVERTER_KEY BINHEX_TO_WILD, &kNS_BINHEXDECODER_CID },
        1011                 : #endif
        1012                 :     { MOZ_TXTTOHTMLCONV_CONTRACTID, &kMOZITXTTOHTMLCONV_CID },
        1013                 :     { "@mozilla.org/dirIndex;1", &kNS_DIRINDEX_CID },
        1014                 :     { NS_MIMEHEADERPARAM_CONTRACTID, &kNS_MIMEHEADERPARAM_CID },
        1015                 : #ifdef NECKO_PROTOCOL_file
        1016                 :     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "file", &kNS_FILEPROTOCOLHANDLER_CID },
        1017                 : #endif
        1018                 : #ifdef NECKO_PROTOCOL_http
        1019                 :     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &kNS_HTTPPROTOCOLHANDLER_CID },
        1020                 :     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "https", &kNS_HTTPSPROTOCOLHANDLER_CID },
        1021                 :     { NS_HTTP_AUTHENTICATOR_CONTRACTID_PREFIX "basic", &kNS_HTTPBASICAUTH_CID },
        1022                 :     { NS_HTTP_AUTHENTICATOR_CONTRACTID_PREFIX "digest", &kNS_HTTPDIGESTAUTH_CID },
        1023                 :     { NS_HTTP_AUTHENTICATOR_CONTRACTID_PREFIX "ntlm", &kNS_HTTPNTLMAUTH_CID },
        1024                 :     { NS_HTTPAUTHMANAGER_CONTRACTID, &kNS_HTTPAUTHMANAGER_CID },
        1025                 :     { NS_HTTPCHANNELAUTHPROVIDER_CONTRACTID, &kNS_HTTPCHANNELAUTHPROVIDER_CID },
        1026                 :     { NS_HTTPACTIVITYDISTRIBUTOR_CONTRACTID, &kNS_HTTPACTIVITYDISTRIBUTOR_CID },
        1027                 : #endif // !NECKO_PROTOCOL_http
        1028                 : #ifdef NECKO_PROTOCOL_ftp
        1029                 :     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "ftp", &kNS_FTPPROTOCOLHANDLER_CID },
        1030                 : #endif
        1031                 : #ifdef NECKO_PROTOCOL_res
        1032                 :     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "resource", &kNS_RESPROTOCOLHANDLER_CID },
        1033                 : #endif
        1034                 :     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "about", &kNS_ABOUTPROTOCOLHANDLER_CID },
        1035                 :     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "moz-safe-about", &kNS_SAFEABOUTPROTOCOLHANDLER_CID },
        1036                 :     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "blank", &kNS_ABOUT_BLANK_MODULE_CID },
        1037                 : #ifdef NECKO_PROTOCOL_about
        1038                 : #ifdef NS_BUILD_REFCNT_LOGGING
        1039                 :     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "bloat", &kNS_ABOUT_BLOAT_MODULE_CID },
        1040                 : #endif
        1041                 :     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "cache", &kNS_ABOUT_CACHE_MODULE_CID },
        1042                 :     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "cache-entry", &kNS_ABOUT_CACHE_ENTRY_MODULE_CID },
        1043                 : #endif
        1044                 :     { NS_NETWORK_SOCKET_CONTRACTID_PREFIX "socks", &kNS_SOCKSSOCKETPROVIDER_CID },
        1045                 :     { NS_NETWORK_SOCKET_CONTRACTID_PREFIX "socks4", &kNS_SOCKS4SOCKETPROVIDER_CID },
        1046                 :     { NS_NETWORK_SOCKET_CONTRACTID_PREFIX "udp", &kNS_UDPSOCKETPROVIDER_CID },
        1047                 :     { NS_CACHESERVICE_CONTRACTID, &kNS_CACHESERVICE_CID },
        1048                 :     { NS_APPLICATIONCACHESERVICE_CONTRACTID, &kNS_APPLICATIONCACHESERVICE_CID },
        1049                 :     { NS_APPLICATIONCACHENAMESPACE_CONTRACTID, &kNS_APPLICATIONCACHENAMESPACE_CID },
        1050                 :     { NS_APPLICATIONCACHE_CONTRACTID, &kNS_APPLICATIONCACHE_CID },
        1051                 : #ifdef NECKO_COOKIES
        1052                 :     { NS_COOKIEMANAGER_CONTRACTID, &kNS_COOKIEMANAGER_CID },
        1053                 :     { NS_COOKIESERVICE_CONTRACTID, &kNS_COOKIESERVICE_CID },
        1054                 : #endif
        1055                 : #ifdef NECKO_WIFI
        1056                 :     { NS_WIFI_MONITOR_CONTRACTID, &kNS_WIFI_MONITOR_COMPONENT_CID },
        1057                 : #endif
        1058                 : #ifdef NECKO_PROTOCOL_data
        1059                 :     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "data", &kNS_DATAPROTOCOLHANDLER_CID },
        1060                 : #endif
        1061                 : #ifdef NECKO_PROTOCOL_device
        1062                 :     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "moz-device", &kNS_DEVICEPROTOCOLHANDLER_CID },
        1063                 : #ifdef MOZ_WIDGET_GONK
        1064                 :     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "b2g-camera", &kNS_B2GPROTOCOLHANDLER_CID },
        1065                 : #endif
        1066                 : #endif
        1067                 : #ifdef NECKO_PROTOCOL_viewsource
        1068                 :     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "view-source", &kNS_VIEWSOURCEHANDLER_CID },
        1069                 : #endif
        1070                 : #ifdef NECKO_PROTOCOL_wyciwyg
        1071                 :     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "wyciwyg", &kNS_WYCIWYGPROTOCOLHANDLER_CID },
        1072                 : #endif
        1073                 : #ifdef NECKO_PROTOCOL_websocket
        1074                 :     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "ws", &kNS_WEBSOCKETPROTOCOLHANDLER_CID },
        1075                 :     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "wss", &kNS_WEBSOCKETSSLPROTOCOLHANDLER_CID },
        1076                 : #endif
        1077                 : #if defined(XP_WIN)
        1078                 :     { NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_NETWORK_LINK_SERVICE_CID },
        1079                 : #elif defined(MOZ_WIDGET_COCOA)
        1080                 :     { NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_NETWORK_LINK_SERVICE_CID },
        1081                 : #elif defined(MOZ_ENABLE_LIBCONIC)
        1082                 :     { NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_NETWORK_LINK_SERVICE_CID },
        1083                 : #elif defined(MOZ_ENABLE_QTNETWORK)
        1084                 :     { NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_NETWORK_LINK_SERVICE_CID },
        1085                 : #elif defined(MOZ_WIDGET_ANDROID)
        1086                 :     { NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_NETWORK_LINK_SERVICE_CID },
        1087                 : #endif
        1088                 :     { NS_SERIALIZATION_HELPER_CONTRACTID, &kNS_SERIALIZATION_HELPER_CID },
        1089                 :     { NS_REDIRECTCHANNELREGISTRAR_CONTRACTID, &kNS_REDIRECTCHANNELREGISTRAR_CID },
        1090                 :     { NULL }
        1091                 : };
        1092                 :
        1093                 : static const mozilla::Module kNeckoModule = {
        1094                 :     mozilla::Module::kVersion,
        1095                 :     kNeckoCIDs,
        1096                 :     kNeckoContracts,
        1097                 :     kNeckoCategories,
        1098                 :     NULL,
        1099                 :     nsNetStartup,
        1100                 :     nsNetShutdown
        1101                 : };
        1102                 :
        1103                 : NSMODULE_DEFN(necko) = &kNeckoModule;

Generated by: LCOV version 1.7