summaryrefslogtreecommitdiffstats
path: root/netwerk/build
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--netwerk/build/components.conf814
-rw-r--r--netwerk/build/moz.build53
-rw-r--r--netwerk/build/nsNetCID.h849
-rw-r--r--netwerk/build/nsNetModule.cpp249
-rw-r--r--netwerk/build/nsNetModule.h33
5 files changed, 1998 insertions, 0 deletions
diff --git a/netwerk/build/components.conf b/netwerk/build/components.conf
new file mode 100644
index 0000000000..474a98354b
--- /dev/null
+++ b/netwerk/build/components.conf
@@ -0,0 +1,814 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+Headers = [
+ '/netwerk/build/nsNetModule.h'
+]
+
+InitFunc = 'nsNetStartup'
+UnloadFunc = 'nsNetShutdown'
+
+Categories = {
+ '@mozilla.org/streamconv;1': {
+ '?from=application/http-index-format&to=text/html': ('', ProcessSelector.ALLOW_IN_SOCKET_PROCESS),
+ '?from=multipart/x-mixed-replace&to=*/*': ('', ProcessSelector.ALLOW_IN_SOCKET_PROCESS),
+ '?from=multipart/mixed&to=*/*': ('', ProcessSelector.ALLOW_IN_SOCKET_PROCESS),
+ '?from=multipart/byteranges&to=*/*': ('', ProcessSelector.ALLOW_IN_SOCKET_PROCESS),
+ '?from=application/x-unknown-content-type&to=*/*': ('', ProcessSelector.ALLOW_IN_SOCKET_PROCESS),
+ '?from=gzip&to=uncompressed': ('', ProcessSelector.ALLOW_IN_SOCKET_PROCESS),
+ '?from=x-gzip&to=uncompressed': ('', ProcessSelector.ALLOW_IN_SOCKET_PROCESS),
+ '?from=br&to=uncompressed': ('', ProcessSelector.ALLOW_IN_SOCKET_PROCESS),
+ '?from=compress&to=uncompressed': ('', ProcessSelector.ALLOW_IN_SOCKET_PROCESS),
+ '?from=x-compress&to=uncompressed': ('', ProcessSelector.ALLOW_IN_SOCKET_PROCESS),
+ '?from=deflate&to=uncompressed': ('', ProcessSelector.ALLOW_IN_SOCKET_PROCESS),
+ },
+}
+
+Classes = [
+ {
+ 'cid': '{3014dde6-aa1c-41db-87d0-48764a3710f6}',
+ 'contract_ids': ['@mozilla.org/io/arraybuffer-input-stream;1'],
+ 'type': 'ArrayBufferInputStream',
+ 'headers': ['/netwerk/base/ArrayBufferInputStream.h'],
+ },
+ {
+ 'js_name': 'loadContextInfo',
+ 'cid': '{62d4b190-3642-4450-b019-d1c1fba56025}',
+ 'contract_ids': ['@mozilla.org/load-context-info-factory;1'],
+ 'interfaces': ['nsILoadContextInfoFactory'],
+ 'type': 'mozilla::net::LoadContextInfoFactory',
+ 'headers': ['mozilla/LoadContextInfo.h'],
+ },
+ {
+ 'name': 'CacheStorage',
+ 'js_name': 'cache2',
+ 'cid': '{ea70b098-5014-4e21-aee1-75e6b2c4b8e0}',
+ 'contract_ids': [
+ '@mozilla.org/netwerk/cache-storage-service;1',
+ '@mozilla.org/network/cache-storage-service;1',
+ ],
+ 'interfaces': ['nsICacheStorageService'],
+ 'singleton': True,
+ 'type': 'mozilla::net::CacheStorageService',
+ 'headers': ['CacheStorageService.h'],
+ },
+ {
+ 'cid': '{e746a8b1-c97a-4fc5-baa4-66607521bd08}',
+ 'contract_ids': ['@mozilla.org/network/async-stream-copier;1'],
+ 'type': 'nsAsyncStreamCopier',
+ 'headers': ['/netwerk/base/nsAsyncStreamCopier.h'],
+ },
+ {
+ 'cid': '{6eae857e-4ba9-11e3-9b39-b4036188709b}',
+ 'contract_ids': ['@mozilla.org/network/atomic-file-output-stream;1'],
+ 'type': 'nsAtomicFileOutputStream',
+ 'headers': ['nsFileStreams.h'],
+ },
+ {
+ 'cid': '{62147d1e-ef6a-40e8-aaf8-d039f5caaa81}',
+ 'contract_ids': ['@mozilla.org/network/background-file-saver;1?mode=outputstream'],
+ 'type': 'mozilla::net::BackgroundFileSaverOutputStream',
+ 'headers': ['/netwerk/base/BackgroundFileSaver.h'],
+ 'init_method': 'Init',
+ },
+ {
+ 'cid': '{208de7fc-a781-4031-bbae-cc0de539f61a}',
+ 'contract_ids': ['@mozilla.org/network/background-file-saver;1?mode=streamlistener'],
+ 'type': 'mozilla::net::BackgroundFileSaverStreamListener',
+ 'headers': ['/netwerk/base/BackgroundFileSaver.h'],
+ 'init_method': 'Init',
+ },
+ {
+ 'cid': '{a2027ec6-ba0d-4c72-805d-148233f5f33c}',
+ 'contract_ids': ['@mozilla.org/network/binary-detector;1'],
+ 'legacy_constructor': 'CreateNewBinaryDetectorFactory',
+ 'categories': {'net-content-sniffers': 'Binary Detector'}
+ },
+ {
+ 'cid': '{9226888e-da08-11d3-8cda-0060b0fc14a3}',
+ 'contract_ids': ['@mozilla.org/network/buffered-input-stream;1'],
+ 'legacy_constructor': 'nsBufferedInputStream::Create',
+ 'headers': ['/netwerk/base/nsBufferedStreams.h'],
+ },
+ {
+ 'cid': '{9868b4ce-da08-11d3-8cda-0060b0fc14a3}',
+ 'contract_ids': ['@mozilla.org/network/buffered-output-stream;1'],
+ 'legacy_constructor': 'nsBufferedOutputStream::Create',
+ 'headers': ['/netwerk/base/nsBufferedStreams.h'],
+ },
+ {
+ 'cid': '{bdbe0555-fc3d-4f7b-9205-c309ceb2d641}',
+ 'contract_ids': ['@mozilla.org/network/captive-portal-service;1'],
+ 'singleton': True,
+ 'type': 'nsICaptivePortalService',
+ 'constructor': 'mozilla::net::CaptivePortalService::GetSingleton',
+ 'headers': ['mozilla/net/CaptivePortalService.h'],
+ },
+ {
+ 'cid': '{c79eb3c6-091a-45a6-8544-5a8d1ab79537}',
+ 'contract_ids': ['@mozilla.org/network/dashboard;1'],
+ 'type': 'mozilla::net::Dashboard',
+ 'headers': ['mozilla/net/Dashboard.h'],
+ },
+ {
+ 'name': 'DNS',
+ 'js_name': 'dns',
+ 'cid': '{b0ff4572-dae4-4bef-a092-83c1b88f6be9}',
+ 'contract_ids': ['@mozilla.org/network/dns-service;1'],
+ 'interfaces': ['nsIDNSService'],
+ 'singleton': True,
+ 'type': 'nsIDNSService',
+ 'constructor': 'nsDNSService::GetXPCOMSingleton',
+ 'headers': ['/netwerk/dns/nsDNSService2.h'],
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ },
+ {
+ 'cid': '{4ffae79e-57bd-4d7a-a0c9-0045a17b3615}',
+ 'contract_ids': ['@mozilla.org/network/native-dns-override;1'],
+ 'singleton': True,
+ 'type': 'nsINativeDNSResolverOverride',
+ 'constructor': 'mozilla::net::NativeDNSResolverOverride::GetSingleton',
+ 'headers': ['/netwerk/dns/GetAddrInfo.h'],
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ },
+ {
+ 'cid': '{510a86bb-6019-4ed1-bb4f-965cffd23ece}',
+ 'contract_ids': ['@mozilla.org/network/downloader;1'],
+ 'type': 'nsDownloader',
+ 'headers': ['/netwerk/base/nsDownloader.h'],
+ },
+ {
+ 'js_name': 'eTLD',
+ 'cid': '{cb9abbae-66b6-4609-8594-5c4ff300888e}',
+ 'contract_ids': ['@mozilla.org/network/effective-tld-service;1'],
+ 'interfaces': ['nsIEffectiveTLDService'],
+ 'singleton': True,
+ 'type': 'nsEffectiveTLDService',
+ 'headers': ['/netwerk/dns/nsEffectiveTLDService.h'],
+ 'init_method': 'Init',
+ },
+ {
+ 'cid': '{be9a53ae-c7e9-11d3-8cda-0060b0fc14a3}',
+ 'contract_ids': ['@mozilla.org/network/file-input-stream;1'],
+ 'legacy_constructor': 'nsFileInputStream::Create',
+ 'headers': ['nsFileStreams.h'],
+ },
+ {
+ 'cid': '{c272fee0-c7e9-11d3-8cda-0060b0fc14a3}',
+ 'contract_ids': ['@mozilla.org/network/file-output-stream;1'],
+ 'legacy_constructor': 'nsFileOutputStream::Create',
+ 'headers': ['nsFileStreams.h'],
+ },
+ {
+ 'cid': '{648705e9-757a-4d4b-a5bF-0248e512c309}',
+ 'contract_ids': ['@mozilla.org/network/file-random-access-stream;1'],
+ 'legacy_constructor': 'nsFileRandomAccessStream::Create',
+ 'headers': ['nsFileStreams.h'],
+ },
+ {
+ 'name': 'HttpActivityDistributor',
+ 'cid': '{15629ada-a41c-4a09-961f-6553cd60b1a2}',
+ 'contract_ids': ['@mozilla.org/network/http-activity-distributor;1'],
+ 'type': 'mozilla::net::nsHttpActivityDistributor',
+ 'headers': ['/netwerk/protocol/http/nsHttpActivityDistributor.h'],
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ },
+ {
+ 'cid': '{36b63ef3-e0fa-4c49-9fd4-e065e85568f4}',
+ 'contract_ids': ['@mozilla.org/network/http-auth-manager;1'],
+ 'type': 'mozilla::net::nsHttpAuthManager',
+ 'headers': ['/netwerk/protocol/http/nsHttpAuthManager.h'],
+ 'init_method': 'Init',
+ },
+ {
+ 'cid': '{62b778a6-bce3-456b-8c31-2865fbb68c91}',
+ 'contract_ids': ['@mozilla.org/network/idn-service;1'],
+ 'type': 'nsIDNService',
+ 'headers': ['/netwerk/dns/nsIDNService.h'],
+ 'init_method': 'Init',
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ },
+ {
+ 'cid': '{a62af1ba-79b3-4896-8aaf-b148bfce4280}',
+ 'contract_ids': ['@mozilla.org/network/incremental-download;1'],
+ 'legacy_constructor': 'net_NewIncrementalDownload',
+ },
+ {
+ 'cid': '{5d6352a3-b9c3-4fa3-87aa-b2a3c6e5a501}',
+ 'contract_ids': ['@mozilla.org/network/incremental-stream-loader;1'],
+ 'legacy_constructor': 'nsIncrementalStreamLoader::Create',
+ 'headers': ['/netwerk/base/nsIncrementalStreamLoader.h'],
+ },
+ {
+ 'cid': '{6ddb050c-0d04-11d4-986e-00c04fa0cf4a}',
+ 'contract_ids': ['@mozilla.org/network/input-stream-channel;1'],
+ 'type': 'mozilla::net::nsInputStreamChannel',
+ 'headers': ['/netwerk/base/nsInputStreamChannel.h'],
+ },
+ {
+ 'cid': '{ccd0e960-7947-4635-b70e-4c661b63d675}',
+ 'contract_ids': ['@mozilla.org/network/input-stream-pump;1'],
+ 'type': 'nsInputStreamPump',
+ 'headers': ['nsInputStreamPump.h'],
+ },
+ {
+ 'name': 'IO',
+ 'js_name': 'io',
+ 'cid': '{9ac9e770-18bc-11d3-9337-00104ba0fd40}',
+ 'contract_ids': [
+ '@mozilla.org/network/io-service;1',
+ '@mozilla.org/network/util;1',
+ ],
+ 'interfaces': ['nsIIOService', 'nsISpeculativeConnect', 'nsINetUtil'],
+ 'singleton': True,
+ 'type': 'mozilla::net::nsIOService',
+ 'headers': ['/netwerk/base/nsIOService.h'],
+ 'constructor': 'mozilla::net::nsIOService::GetInstance',
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ },
+ {
+ 'cid': '{e1c61582-2a84-11d3-8cce-0060b0fc14a3}',
+ 'contract_ids': ['@mozilla.org/network/load-group;1'],
+ 'legacy_constructor': 'nsLoadGroupConstructor',
+ },
+ {
+ 'cid': '{1f4dbcf7-245c-4c8c-943d-8a1da0495e8a}',
+ 'contract_ids': ['@mozilla.org/network/mime-hdrparam;1'],
+ 'type': 'nsMIMEHeaderParamImpl',
+ 'headers': ['/netwerk/mime/nsMIMEHeaderParamImpl.h'],
+ },
+ {
+ 'cid': '{58a1c31c-1dd2-11b2-a3f6-d36949d48268}',
+ 'contract_ids': ['@mozilla.org/network/mime-input-stream;1'],
+ 'legacy_constructor': 'nsMIMEInputStreamConstructor',
+ 'headers': ['nsMIMEInputStream.h'],
+ },
+ {
+ 'cid': '{2693457e-3ba5-4455-991f-5350946adb12}',
+ 'contract_ids': ['@mozilla.org/network/network-connectivity-service;1'],
+ 'singleton': True,
+ 'type': 'nsINetworkConnectivityService',
+ 'constructor': 'mozilla::net::NetworkConnectivityService::GetSingleton',
+ 'headers': ['mozilla/net/NetworkConnectivityService.h'],
+ },
+ {
+ 'cid': '{969adfdf-7221-4419-aecf-05f8faf00c9b}',
+ 'contract_ids': ['@mozilla.org/network/predictor;1'],
+ 'singleton': True,
+ 'legacy_constructor': 'mozilla::net::Predictor::Create',
+ 'headers': ['mozilla/net/Predictor.h'],
+ },
+ {
+ 'cid': '{e9b301c0-e0e4-11d3-a1a8-0050041caf44}',
+ 'contract_ids': ['@mozilla.org/network/protocol-proxy-service;1'],
+ 'singleton': True,
+ 'type': 'mozilla::net::nsProtocolProxyService',
+ 'headers': ['/netwerk/base/nsProtocolProxyService.h'],
+ 'init_method': 'Init',
+ },
+ {
+ 'cid': '{3decd6c8-30ef-11d3-8cd0-0060b0fc14a3}',
+ 'contract_ids': ['@mozilla.org/network/protocol/about;1?what=blank'],
+ 'legacy_constructor': 'nsAboutBlank::Create',
+ 'headers': ['/netwerk/protocol/about/nsAboutBlank.h'],
+ },
+ {
+ 'cid': '{9158c470-86e4-11d4-9be2-00e09872a416}',
+ 'contract_ids': ['@mozilla.org/network/protocol/about;1?what=cache'],
+ 'legacy_constructor': 'nsAboutCache::Create',
+ 'headers': ['/netwerk/protocol/about/nsAboutCache.h'],
+ },
+ {
+ 'cid': '{7fa5237d-b0eb-438f-9e50-ca0166e63788}',
+ 'contract_ids': ['@mozilla.org/network/protocol/about;1?what=cache-entry'],
+ 'type': 'nsAboutCacheEntry',
+ 'headers': ['/netwerk/protocol/about/nsAboutCacheEntry.h'],
+ },
+ {
+ 'cid': '{9e3b6c90-2f75-11d3-8cd0-0060b0fc14a3}',
+ 'contract_ids': ['@mozilla.org/network/protocol;1?name=about'],
+ 'singleton': True,
+ 'type': 'mozilla::net::nsAboutProtocolHandler',
+ 'headers': ['/netwerk/protocol/about/nsAboutProtocolHandler.h'],
+ 'protocol_config': {
+ 'scheme': 'about',
+ 'flags': [
+ 'URI_NORELATIVE',
+ 'URI_NOAUTH',
+ 'URI_DANGEROUS_TO_LOAD',
+ 'URI_SCHEME_NOT_SELF_LINKABLE',
+ ],
+ 'has_dynamic_flags': True,
+ },
+ },
+ {
+ 'cid': '{b6ed3030-6183-11d3-a178-0050041caf44}',
+ 'contract_ids': ['@mozilla.org/network/protocol;1?name=data'],
+ 'singleton': True,
+ 'legacy_constructor': 'nsDataHandler::Create',
+ 'headers': ['/netwerk/protocol/data/nsDataHandler.h'],
+ 'protocol_config': {
+ 'scheme': 'data',
+ 'flags': [
+ 'URI_NORELATIVE',
+ 'URI_NOAUTH',
+ 'URI_INHERITS_SECURITY_CONTEXT',
+ 'URI_LOADABLE_BY_ANYONE',
+ 'URI_NON_PERSISTABLE',
+ 'URI_IS_LOCAL_RESOURCE',
+ 'URI_SYNC_LOAD_IS_OK',
+ ],
+ },
+ },
+ {
+ 'cid': '{fbc81170-1f69-11d3-9344-00104ba0fd40}',
+ 'contract_ids': ['@mozilla.org/network/protocol;1?name=file'],
+ 'singleton': True,
+ 'type': 'nsFileProtocolHandler',
+ 'headers': ['mozilla/net/nsFileProtocolHandler.h'],
+ 'init_method': 'Init',
+ 'protocol_config': {
+ 'scheme': 'file',
+ 'flags': [
+ 'URI_NOAUTH',
+ 'URI_IS_LOCAL_FILE',
+ 'URI_IS_LOCAL_RESOURCE',
+ 'URI_IS_POTENTIALLY_TRUSTWORTHY',
+ ],
+ },
+ },
+ {
+ 'cid': '{4f47e42e-4d23-4dd3-bfda-eb29255e9ea3}',
+ 'contract_ids': ['@mozilla.org/network/protocol;1?name=http'],
+ 'singleton': True,
+ 'type': 'mozilla::net::nsHttpHandler',
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ 'protocol_config': {
+ 'scheme': 'http',
+ 'flags': [
+ 'URI_STD',
+ 'ALLOWS_PROXY',
+ 'ALLOWS_PROXY_HTTP',
+ 'URI_LOADABLE_BY_ANYONE',
+ ],
+ 'default_port': 80,
+ },
+ },
+ {
+ 'cid': '{dccbe7e4-7750-466b-a557-5ea36c8ff24e}',
+ 'contract_ids': ['@mozilla.org/network/protocol;1?name=https'],
+ 'singleton': True,
+ 'type': 'mozilla::net::nsHttpsHandler',
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ 'protocol_config': {
+ 'scheme': 'https',
+ 'flags': [
+ 'URI_STD',
+ 'ALLOWS_PROXY',
+ 'ALLOWS_PROXY_HTTP',
+ 'URI_LOADABLE_BY_ANYONE',
+ 'URI_IS_POTENTIALLY_TRUSTWORTHY',
+ ],
+ 'default_port': 443,
+ },
+ },
+ {
+ 'cid': '{aea16cd0-f020-4138-b068-0716c4a15b5a}',
+ 'contract_ids': ['@mozilla.org/network/protocol;1?name=moz-extension'],
+ 'singleton': True,
+ 'type': 'mozilla::net::ExtensionProtocolHandler',
+ 'headers': ['mozilla/net/ExtensionProtocolHandler.h'],
+ 'constructor': 'mozilla::net::ExtensionProtocolHandler::GetSingleton',
+ 'protocol_config': {
+ 'scheme': 'moz-extension',
+ 'flags': [
+ 'URI_STD',
+ 'URI_IS_LOCAL_RESOURCE',
+ 'URI_IS_POTENTIALLY_TRUSTWORTHY',
+ ],
+ 'has_dynamic_flags': True,
+ },
+ },
+ {
+ 'cid': '{450a2b55-620a-44b3-9f67-839b3b0c329c}',
+ 'contract_ids': ['@mozilla.org/network/protocol;1?name=moz-page-thumb'],
+ 'singleton': True,
+ 'type': 'mozilla::net::PageThumbProtocolHandler',
+ 'headers': ['mozilla/net/PageThumbProtocolHandler.h'],
+ 'constructor': 'mozilla::net::PageThumbProtocolHandler::GetSingleton',
+ 'protocol_config': {
+ 'scheme': 'moz-page-thumb',
+ 'flags': [
+ 'URI_STD',
+ 'URI_IS_UI_RESOURCE',
+ 'URI_IS_LOCAL_RESOURCE',
+ 'URI_NORELATIVE',
+ 'URI_NOAUTH',
+ ],
+ },
+ },
+ {
+ 'cid': '{1423e739-782c-4081-b5d8-fe6fba68c0ef}',
+ 'contract_ids': ['@mozilla.org/network/protocol;1?name=moz-safe-about'],
+ 'singleton': True,
+ 'type': 'mozilla::net::nsSafeAboutProtocolHandler',
+ 'headers': ['/netwerk/protocol/about/nsAboutProtocolHandler.h'],
+ 'protocol_config': {
+ 'scheme': 'moz-safe-about',
+ 'flags': [
+ 'URI_NORELATIVE',
+ 'URI_NOAUTH',
+ 'URI_LOADABLE_BY_ANYONE',
+ 'URI_IS_POTENTIALLY_TRUSTWORTHY',
+ ],
+ },
+ },
+ {
+ 'cid': '{e64f152a-9f07-11d3-8cda-0060b0fc14a3}',
+ 'contract_ids': ['@mozilla.org/network/protocol;1?name=resource'],
+ 'singleton': True,
+ 'type': 'nsResProtocolHandler',
+ 'headers': ['/netwerk/protocol/res/nsResProtocolHandler.h'],
+ 'constructor': 'nsResProtocolHandler::GetSingleton',
+ 'protocol_config': {
+ 'scheme': 'resource',
+ 'flags': [
+ 'URI_STD',
+ 'URI_IS_UI_RESOURCE',
+ 'URI_IS_LOCAL_RESOURCE',
+ 'URI_IS_POTENTIALLY_TRUSTWORTHY',
+ ],
+ },
+ },
+ {
+ 'cid': '{9c7ec5d1-23f9-11d5-aea8-8fcc0793e97f}',
+ 'contract_ids': ['@mozilla.org/network/protocol;1?name=view-source'],
+ 'singleton': True,
+ 'type': 'mozilla::net::nsViewSourceHandler',
+ 'headers': ['/netwerk/protocol/viewsource/nsViewSourceHandler.h'],
+ 'protocol_config': {
+ 'scheme': 'view-source',
+ 'flags': [
+ 'URI_NORELATIVE',
+ 'URI_NOAUTH',
+ 'URI_DANGEROUS_TO_LOAD',
+ 'URI_NON_PERSISTABLE',
+ ],
+ 'has_dynamic_flags': True,
+ },
+ },
+ {
+ 'cid': '{dc01db59-a513-4c90-824b-085cce06c0aa}',
+ 'contract_ids': ['@mozilla.org/network/protocol;1?name=ws'],
+ 'singleton': True,
+ 'legacy_constructor': 'mozilla::net::WebSocketChannelConstructor',
+ 'protocol_config': {
+ 'scheme': 'ws',
+ 'flags': [
+ 'URI_NORELATIVE',
+ 'URI_NON_PERSISTABLE',
+ 'ALLOWS_PROXY',
+ 'ALLOWS_PROXY_HTTP',
+ 'URI_DOES_NOT_RETURN_DATA',
+ 'URI_DANGEROUS_TO_LOAD',
+ ],
+ 'default_port': 80,
+ },
+ },
+ {
+ 'cid': '{dc01dbbb-a5bb-4cbb-82bb-085cce06c0bb}',
+ 'contract_ids': ['@mozilla.org/network/protocol;1?name=wss'],
+ 'singleton': True,
+ 'legacy_constructor': 'mozilla::net::WebSocketSSLChannelConstructor',
+ 'protocol_config': {
+ 'scheme': 'wss',
+ 'flags': [
+ 'URI_NORELATIVE',
+ 'URI_NON_PERSISTABLE',
+ 'ALLOWS_PROXY',
+ 'ALLOWS_PROXY_HTTP',
+ 'URI_DOES_NOT_RETURN_DATA',
+ 'URI_DANGEROUS_TO_LOAD',
+ 'URI_IS_POTENTIALLY_TRUSTWORTHY',
+ ],
+ 'default_port': 443,
+ },
+ },
+ {
+ 'cid': '{a181af0d-68b8-4308-94db-d4f859058215}',
+ 'contract_ids': ['@mozilla.org/network/safe-file-output-stream;1'],
+ 'type': 'nsSafeFileOutputStream',
+ 'headers': ['nsFileStreams.h'],
+ },
+ {
+ 'cid': '{d6ef593d-a429-4b14-a887-d9e2f765d9ed}',
+ 'contract_ids': ['@mozilla.org/network/serialization-helper;1'],
+ 'type': 'nsSerializationHelper',
+ 'headers': ['nsSerializationHelper.h'],
+ },
+ {
+ 'cid': '{2ec62893-3b35-48fa-ab1d-5e68a9f45f08}',
+ 'contract_ids': ['@mozilla.org/network/server-socket;1'],
+ 'type': 'mozilla::net::nsServerSocket',
+ 'headers': ['/netwerk/base/nsServerSocket.h'],
+ },
+ {
+ 'cid': '{fb8cbf4e-4701-4ba1-b1d6-5388e041fb67}',
+ 'contract_ids': ['@mozilla.org/network/simple-stream-listener;1'],
+ 'type': 'mozilla::net::nsSimpleStreamListener',
+ 'headers': ['/netwerk/base/nsSimpleStreamListener.h'],
+ },
+ {
+ 'cid': '{2be14592-28d4-4a83-8fe9-08e778849f6e}',
+ 'contract_ids': ['@mozilla.org/network/simple-uri-mutator;1'],
+ 'type': 'mozilla::net::nsSimpleURI::Mutator',
+ 'headers': ['nsSimpleURI.h'],
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ },
+ {
+ 'cid': '{04445aa0-fd27-4c99-bd41-6be6318ae92c}',
+ 'contract_ids': ['@mozilla.org/network/default-uri-mutator;1'],
+ 'type': 'mozilla::net::DefaultURI::Mutator',
+ 'headers': ['/netwerk/base/DefaultURI.h'],
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ },
+ {
+ 'name': 'SocketTransport',
+ 'cid': '{ad56b25f-e6bb-4db3-9f7b-5b7db33fd2b1}',
+ 'contract_ids': ['@mozilla.org/network/socket-transport-service;1'],
+ 'singleton': True,
+ 'type': 'mozilla::net::nsSocketTransportService',
+ 'headers': ['/netwerk/base/nsSocketTransportService2.h'],
+ 'init_method': 'Init',
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ },
+ {
+ 'cid': '{ce7d7da0-fb28-44a3-8c7b-000c165918f4}',
+ 'contract_ids': ['@mozilla.org/network/standard-url-mutator;1'],
+ 'type': 'mozilla::net::nsStandardURL::Mutator',
+ 'headers': ['/netwerk/base/nsStandardURL.h'],
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ },
+ {
+ 'cid': '{831f8f13-7aa8-485f-b02e-77c881cc5773}',
+ 'contract_ids': ['@mozilla.org/network/stream-listener-tee;1'],
+ 'type': 'mozilla::net::nsStreamListenerTee',
+ 'headers': ['/netwerk/base/nsStreamListenerTee.h'],
+ },
+ {
+ 'cid': '{9879908a-2972-40c0-890b-a91dd7dfb954}',
+ 'contract_ids': ['@mozilla.org/network/stream-loader;1'],
+ 'legacy_constructor': 'mozilla::net::nsStreamLoader::Create',
+ 'headers': ['/netwerk/base/nsStreamLoader.h'],
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ },
+ {
+ 'name': 'StreamTransport',
+ 'cid': '{0885d4f8-f7b8-4cda-902e-94ba38bc256e}',
+ 'contract_ids': ['@mozilla.org/network/stream-transport-service;1'],
+ 'type': 'mozilla::net::nsStreamTransportService',
+ 'headers': ['/netwerk/base/nsStreamTransportService.h'],
+ 'init_method': 'Init',
+ },
+ {
+ 'cid': '{4c39159c-cd90-4dd3-97a7-06af5e6d84c4}',
+ 'contract_ids': ['@mozilla.org/network/throttlequeue;1'],
+ 'type': 'nsIInputChannelThrottleQueue',
+ 'constructor': 'mozilla::net::ThrottleQueue::Create',
+ 'headers': ['/netwerk/base/ThrottleQueue.h'],
+ },
+ {
+ 'cid': '{1813cbb4-c98e-4622-8c7d-839167f3f272}',
+ 'contract_ids': ['@mozilla.org/network/tls-server-socket;1'],
+ 'type': 'mozilla::net::TLSServerSocket',
+ 'headers': ['/netwerk/base/TLSServerSocket.h'],
+ },
+ {
+ 'cid': '{c9f74572-7b8e-4fec-bb4a-03c0d3021bd6}',
+ 'contract_ids': ['@mozilla.org/network/udp-socket;1'],
+ 'type': 'mozilla::net::nsUDPSocket',
+ 'headers': ['/netwerk/base/nsUDPSocket.h'],
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ },
+ {
+ 'cid': '{ff41913b-546a-4bff-9201-dc9b2c032eba}',
+ 'contract_ids': ['@mozilla.org/network/url-parser;1?auth=maybe'],
+ 'type': 'nsStdURLParser',
+ 'headers': ['nsURLParsers.h'],
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ },
+ {
+ 'cid': '{78804a84-8173-42b6-bb94-789f0816a810}',
+ 'contract_ids': ['@mozilla.org/network/url-parser;1?auth=no'],
+ 'type': 'nsNoAuthURLParser',
+ 'headers': ['nsURLParsers.h'],
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ },
+ {
+ 'cid': '{275d800e-3f60-4896-adb7-d7f390ce0e42}',
+ 'contract_ids': ['@mozilla.org/network/url-parser;1?auth=yes'],
+ 'type': 'nsAuthURLParser',
+ 'headers': ['nsURLParsers.h'],
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ },
+ {
+ 'cid': '{892ffeb0-3f80-11d3-a16c-0050041caf44}',
+ 'contract_ids': ['@mozilla.org/streamConverters;1'],
+ 'legacy_constructor': 'CreateNewStreamConvServiceFactory',
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ },
+ {
+ 'cid': '{cf0f71fd-fafd-4e2b-9fdc-134d972e16e2}',
+ 'contract_ids': ['@mozilla.org/streamconv;1?from=application/http-index-format&to=text/html'],
+ 'legacy_constructor': 'nsIndexedToHTML::Create',
+ 'headers': ['/netwerk/streamconv/converters/nsIndexedToHTML.h'],
+ },
+ {
+ 'cid': '{7d7008a0-c49a-11d3-9b22-0080c7cb1080}',
+ 'contract_ids': ['@mozilla.org/streamconv;1?from=application/x-unknown-content-type&to=*/*'],
+ 'legacy_constructor': 'CreateNewUnknownDecoderFactory',
+ },
+ {
+ 'cid': '{66230b2b-17fa-4bd3-abf4-07986151022d}',
+ 'contract_ids': [
+ '@mozilla.org/streamconv;1?from=br&to=uncompressed',
+ '@mozilla.org/streamconv;1?from=compress&to=uncompressed',
+ '@mozilla.org/streamconv;1?from=deflate&to=uncompressed',
+ '@mozilla.org/streamconv;1?from=gzip&to=uncompressed',
+ '@mozilla.org/streamconv;1?from=x-compress&to=uncompressed',
+ '@mozilla.org/streamconv;1?from=x-gzip&to=uncompressed',
+ ],
+ 'legacy_constructor': 'CreateNewHTTPCompressConvFactory',
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ },
+ {
+ 'cid': '{7584ce90-5b25-11d3-a175-0050041caf44}',
+ 'contract_ids': [
+ '@mozilla.org/streamconv;1?from=multipart/byteranges&to=*/*',
+ '@mozilla.org/streamconv;1?from=multipart/mixed&to=*/*',
+ '@mozilla.org/streamconv;1?from=multipart/x-mixed-replace&to=*/*',
+ ],
+ 'legacy_constructor': 'CreateNewMultiMixedConvFactory',
+ },
+ {
+ 'cid': '{77c0e42a-1dd2-11b2-8ebf-edc6606f2f4b}',
+ 'contract_ids': ['@mozilla.org/txttohtmlconv;1'],
+ 'legacy_constructor': 'CreateNewTXTToHTMLConvFactory',
+ },
+ {
+ 'cid': '{2f277c00-0eaf-4ddb-b936-41326ba48aae}',
+ 'contract_ids': [],
+ 'type': 'mozilla::net::nsNestedAboutURI::Mutator',
+ 'headers': ['/netwerk/protocol/about/nsAboutProtocolHandler.h'],
+ },
+ {
+ 'cid': '{56388dad-287b-4240-a785-85c394012503}',
+ 'contract_ids': [],
+ 'type': 'mozilla::net::nsSimpleNestedURI::Mutator',
+ 'headers': ['nsSimpleNestedURI.h'],
+ },
+ {
+ 'cid': '{9c4e9d49-ce64-4ca3-acef-3075c5e5aba7}',
+ 'contract_ids': [],
+ 'type': 'mozilla::net::nsSimpleNestedURI::Mutator',
+ 'headers': ['nsSimpleNestedURI.h'],
+ },
+ {
+ 'cid': '{b0054ef3-b096-483d-8242-4ee36b7b2115}',
+ 'contract_ids': [],
+ 'type': 'mozilla::net::nsNestedAboutURI::Mutator',
+ 'headers': ['/netwerk/protocol/about/nsAboutProtocolHandler.h'],
+ },
+ {
+ 'cid': '{b3cfeb91-332a-46c9-ad97-93ff39841494}',
+ 'contract_ids': [],
+ 'type': 'mozilla::net::SubstitutingURL::Mutator',
+ 'headers': ['mozilla/net/SubstitutingURL.h'],
+ },
+ {
+ 'cid': '{de9472d0-8034-11d3-9399-00104ba0fd40}',
+ 'contract_ids': [],
+ 'type': 'mozilla::net::nsStandardURL::Mutator',
+ 'headers': ['/netwerk/base/nsStandardURL.h'],
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ },
+ {
+ 'cid': '{dea9657c-18cf-4984-bde9-ccef5d8ab473}',
+ 'contract_ids': [],
+ 'type': 'mozilla::net::SubstitutingURL::Mutator',
+ 'headers': ['mozilla/net/SubstitutingURL.h'],
+ },
+ {
+ 'cid': '{50d50ddf-f16a-4652-8705-936b19c3763b}',
+ 'contract_ids': [],
+ 'type': 'mozilla::net::SubstitutingJARURI',
+ 'headers': ['mozilla/net/SubstitutingJARURI.h'],
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ },
+ {
+ 'cid': '{e0da1d70-2f7b-11d3-8cd0-0060b0fc14a3}',
+ 'contract_ids': [],
+ 'type': 'mozilla::net::nsSimpleURI::Mutator',
+ 'headers': ['nsSimpleURI.h'],
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ },
+ {
+ 'js_name': 'cookies',
+ 'cid': '{c375fa80-150f-11d6-a618-0010a401eb10}',
+ 'contract_ids': [
+ '@mozilla.org/cookieService;1',
+ '@mozilla.org/cookiemanager;1',
+ ],
+ 'interfaces': ['nsICookieService', 'nsICookieManager'],
+ 'singleton': True,
+ 'type': 'nsICookieService',
+ 'constructor': 'mozilla::net::CookieService::GetXPCOMSingleton',
+ 'headers': ['/netwerk/cookie/CookieService.h'],
+ },
+ {
+ 'cid': '{e1676f84-e6e5-45d0-a4bf-d9905efc5b2e}',
+ 'contract_ids': ['@mozilla.org/http-sfv-service;1'],
+ 'singleton': True,
+ 'constructor': 'mozilla::net::GetSFVService',
+ 'headers': ['mozilla/net/SFVService.h'],
+ },
+ {
+ 'cid': '{4ce234f1-52e8-47a9-8c8d-b02f815733c7}',
+ 'contract_ids': ['@mozilla.org/cookieJarSettings;1'],
+ 'type': 'nsICookieJarSettings',
+ 'constructor': 'mozilla::net::CookieJarSettings::CreateForXPCOM',
+ 'headers': ['mozilla/net/CookieJarSettings.h'],
+ },
+]
+
+if defined('NECKO_WIFI'):
+ Classes += [
+ {
+ 'cid': '{3ff8fb9f-ee63-48df-89f0-dace0242fd82}',
+ 'contract_ids': ['@mozilla.org/wifi/monitor;1'],
+ 'singleton': True,
+ 'type': 'nsWifiMonitor',
+ 'headers': ['/netwerk/wifi/nsWifiMonitor.h'],
+ },
+ ]
+
+if buildconfig.substs['OS_ARCH'] in ('WINNT', 'Darwin', 'Linux'):
+ Classes += [
+ {
+ 'cid': '{296d0900-f8ef-4df0-9c35-db5862abc58d}',
+ 'contract_ids': ['@mozilla.org/network-info-service;1'],
+ 'type': 'mozilla::net::nsNetworkInfoService',
+ 'headers': ['/netwerk/base/nsNetworkInfoService.h'],
+ 'init_method': 'Init',
+ },
+ ]
+
+
+toolkit = buildconfig.substs['MOZ_WIDGET_TOOLKIT']
+link_service = None
+if toolkit == 'windows':
+ link_service = {
+ 'type': 'nsNotifyAddrListener',
+ 'headers': ['/netwerk/system/win32/nsNotifyAddrListener.h'],
+ 'init_method': 'Init',
+ }
+elif toolkit == 'cocoa':
+ link_service = {
+ 'type': 'nsNetworkLinkService',
+ 'headers': ['/netwerk/system/mac/nsNetworkLinkService.h'],
+ 'init_method': 'Init',
+ }
+elif toolkit == 'android':
+ link_service = {
+ 'type': 'nsAndroidNetworkLinkService',
+ 'headers': ['/netwerk/system/android/nsAndroidNetworkLinkService.h'],
+ 'init_method': 'Init',
+ }
+elif buildconfig.substs['OS_ARCH'] == 'Linux':
+ link_service = {
+ 'type': 'nsNetworkLinkService',
+ 'headers': ['/netwerk/system/linux/nsNetworkLinkService.h'],
+ 'init_method': 'Init',
+ }
+
+if link_service:
+ Classes += [
+ dict({
+ 'cid': '{75a500a2-0030-40f7-86f8-63f225b940ae}',
+ 'contract_ids': ['@mozilla.org/network/network-link-service;1'],
+ 'singleton': True,
+ }, **link_service)
+ ]
+
+if toolkit != 'android':
+ Classes += [
+ {
+ 'cid': '{72da39cc-0b9b-4fff-8ff9-d3b9a41d0dc4}',
+ 'contract_ids': ['@mozilla.org/net/CachePurgeLock;1'],
+ 'type': 'mozilla::net::CachePurgeLock',
+ 'headers': ['mozilla/net/CachePurgeLock.h'],
+ },
+ ]
diff --git a/netwerk/build/moz.build b/netwerk/build/moz.build
new file mode 100644
index 0000000000..a3c3fbdd66
--- /dev/null
+++ b/netwerk/build/moz.build
@@ -0,0 +1,53 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+EXPORTS += [
+ "nsNetCID.h",
+]
+
+SOURCES += [
+ "nsNetModule.cpp",
+]
+
+XPCOM_MANIFESTS += [
+ "components.conf",
+]
+
+include("/ipc/chromium/chromium-config.mozbuild")
+
+FINAL_LIBRARY = "xul"
+
+LOCAL_INCLUDES += [
+ "/netwerk/base",
+ "/netwerk/dns",
+ "/netwerk/mime",
+ "/netwerk/protocol/about",
+ "/netwerk/protocol/data",
+ "/netwerk/protocol/file",
+ "/netwerk/protocol/http",
+ "/netwerk/protocol/res",
+ "/netwerk/protocol/viewsource",
+ "/netwerk/protocol/websocket",
+ "/netwerk/socket",
+ "/netwerk/streamconv",
+ "/netwerk/streamconv/converters",
+]
+
+if CONFIG["MOZ_AUTH_EXTENSION"]:
+ LOCAL_INCLUDES += [
+ "/extensions/auth",
+ ]
+
+if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
+ LOCAL_INCLUDES += [
+ "/netwerk/protocol/gio",
+ ]
+
+
+LOCAL_INCLUDES += [
+ "!/netwerk/dns",
+ "/modules/brotli/dec",
+]
diff --git a/netwerk/build/nsNetCID.h b/netwerk/build/nsNetCID.h
new file mode 100644
index 0000000000..641fd9e4b3
--- /dev/null
+++ b/netwerk/build/nsNetCID.h
@@ -0,0 +1,849 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef nsNetCID_h__
+#define nsNetCID_h__
+
+/******************************************************************************
+ * netwerk/base/ classes
+ */
+
+// service implementing nsIIOService
+#define NS_IOSERVICE_CONTRACTID "@mozilla.org/network/io-service;1"
+#define NS_IOSERVICE_CID \
+ { /* 9ac9e770-18bc-11d3-9337-00104ba0fd40 */ \
+ 0x9ac9e770, 0x18bc, 0x11d3, { \
+ 0x93, 0x37, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 \
+ } \
+ }
+
+// service implementing nsINetUtil
+#define NS_NETUTIL_CONTRACTID "@mozilla.org/network/util;1"
+
+// serialization scriptable helper
+#define NS_SERIALIZATION_HELPER_CONTRACTID \
+ "@mozilla.org/network/serialization-helper;1"
+#define NS_SERIALIZATION_HELPER_CID \
+ { /* D6EF593D-A429-4b14-A887-D9E2F765D9ED */ \
+ 0xd6ef593d, 0xa429, 0x4b14, { \
+ 0xa8, 0x87, 0xd9, 0xe2, 0xf7, 0x65, 0xd9, 0xed \
+ } \
+ }
+
+// service implementing nsIProtocolProxyService and nsPIProtocolProxyService.
+#define NS_PROTOCOLPROXYSERVICE_CONTRACTID \
+ "@mozilla.org/network/protocol-proxy-service;1"
+#define NS_PROTOCOLPROXYSERVICE_CID \
+ { /* E9B301C0-E0E4-11d3-A1A8-0050041CAF44 */ \
+ 0xe9b301c0, 0xe0e4, 0x11d3, { \
+ 0xa1, 0xa8, 0x0, 0x50, 0x4, 0x1c, 0xaf, 0x44 \
+ } \
+ }
+
+// component implementing nsILoadGroup.
+#define NS_LOADGROUP_CONTRACTID "@mozilla.org/network/load-group;1"
+#define NS_LOADGROUP_CID \
+ { /* e1c61582-2a84-11d3-8cce-0060b0fc14a3 */ \
+ 0xe1c61582, 0x2a84, 0x11d3, { \
+ 0x8c, 0xce, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 \
+ } \
+ }
+
+// component implementing nsIURI, nsISerializable, and nsIClassInfo.
+#define NS_SIMPLEURI_CID \
+ { /* e0da1d70-2f7b-11d3-8cd0-0060b0fc14a3 */ \
+ 0xe0da1d70, 0x2f7b, 0x11d3, { \
+ 0x8c, 0xd0, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 \
+ } \
+ }
+
+// component implementing nsIURI, nsISerializable, and nsIClassInfo.
+#define NS_ICONURI_CID \
+ { /* 1460df3b-774c-4205-8349-838e507c3ef9 */ \
+ 0x1460df3b, 0x774c, 0x4205, { \
+ 0x83, 0x49, 0x83, 0x8e, 0x50, 0x7c, 0x3e, 0xf9 \
+ } \
+ }
+
+#define NS_SIMPLEURIMUTATOR_CONTRACTID \
+ "@mozilla.org/network/simple-uri-mutator;1"
+#define NS_SIMPLEURIMUTATOR_CID \
+ { /* 2be14592-28d4-4a83-8fe9-08e778849f6e */ \
+ 0x2be14592, 0x28d4, 0x4a83, { \
+ 0x8f, 0xe9, 0x08, 0xe7, 0x78, 0x84, 0x9f, 0x6e \
+ } \
+ }
+
+// component inheriting from the simple URI component and also
+// implementing nsINestedURI.
+#define NS_SIMPLENESTEDURI_CID \
+ { /* 56388dad-287b-4240-a785-85c394012503 */ \
+ 0x56388dad, 0x287b, 0x4240, { \
+ 0xa7, 0x85, 0x85, 0xc3, 0x94, 0x01, 0x25, 0x03 \
+ } \
+ }
+
+#define NS_SIMPLENESTEDURIMUTATOR_CID \
+ { /* 9c4e9d49-ce64-4ca3-acef-3075c5e5aba7 */ \
+ 0x9c4e9d49, 0xce64, 0x4ca3, { \
+ 0xac, 0xef, 0x30, 0x75, 0xc5, 0xe5, 0xab, 0xa7 \
+ } \
+ }
+
+// component inheriting from the nested simple URI component and also
+// carrying along its base URI
+#define NS_NESTEDABOUTURI_CID \
+ { /* 2f277c00-0eaf-4ddb-b936-41326ba48aae */ \
+ 0x2f277c00, 0x0eaf, 0x4ddb, { \
+ 0xb9, 0x36, 0x41, 0x32, 0x6b, 0xa4, 0x8a, 0xae \
+ } \
+ }
+
+#define NS_NESTEDABOUTURIMUTATOR_CID \
+ { /* b0054ef3-b096-483d-8242-4ee36b7b2115 */ \
+ 0xb0054ef3, 0xb096, 0x483d, { \
+ 0x82, 0x42, 0x4e, 0xe3, 0x6b, 0x7b, 0x21, 0x15 \
+ } \
+ }
+
+// component implementing nsIStandardURL, nsIURI, nsIURL, nsISerializable,
+// and nsIClassInfo.
+#define NS_STANDARDURL_CID \
+ { /* de9472d0-8034-11d3-9399-00104ba0fd40 */ \
+ 0xde9472d0, 0x8034, 0x11d3, { \
+ 0x93, 0x99, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 \
+ } \
+ }
+
+#define NS_STANDARDURLMUTATOR_CONTRACTID \
+ "@mozilla.org/network/standard-url-mutator;1"
+#define NS_STANDARDURLMUTATOR_CID \
+ { /* ce7d7da0-fb28-44a3-8c7b-000c165918f4 */ \
+ 0xce7d7da0, 0xfb28, 0x44a3, { \
+ 0x8c, 0x7b, 0x00, 0x0c, 0x16, 0x59, 0x18, 0xf4 \
+ } \
+ }
+
+// service implementing nsIURLParser that assumes the URL will NOT contain an
+// authority section.
+#define NS_NOAUTHURLPARSER_CONTRACTID \
+ "@mozilla.org/network/url-parser;1?auth=no"
+#define NS_NOAUTHURLPARSER_CID \
+ { /* 78804a84-8173-42b6-bb94-789f0816a810 */ \
+ 0x78804a84, 0x8173, 0x42b6, { \
+ 0xbb, 0x94, 0x78, 0x9f, 0x08, 0x16, 0xa8, 0x10 \
+ } \
+ }
+
+// service implementing nsIURLParser that assumes the URL will contain an
+// authority section.
+#define NS_AUTHURLPARSER_CONTRACTID "@mozilla.org/network/url-parser;1?auth=yes"
+#define NS_AUTHURLPARSER_CID \
+ { /* 275d800e-3f60-4896-adb7-d7f390ce0e42 */ \
+ 0x275d800e, 0x3f60, 0x4896, { \
+ 0xad, 0xb7, 0xd7, 0xf3, 0x90, 0xce, 0x0e, 0x42 \
+ } \
+ }
+
+// service implementing nsIURLParser that does not make any assumptions about
+// whether or not the URL contains an authority section.
+#define NS_STDURLPARSER_CONTRACTID \
+ "@mozilla.org/network/url-parser;1?auth=maybe"
+#define NS_STDURLPARSER_CID \
+ { /* ff41913b-546a-4bff-9201-dc9b2c032eba */ \
+ 0xff41913b, 0x546a, 0x4bff, { \
+ 0x92, 0x01, 0xdc, 0x9b, 0x2c, 0x03, 0x2e, 0xba \
+ } \
+ }
+
+// component implementing nsISimpleStreamListener.
+#define NS_SIMPLESTREAMLISTENER_CONTRACTID \
+ "@mozilla.org/network/simple-stream-listener;1"
+#define NS_SIMPLESTREAMLISTENER_CID \
+ { /* fb8cbf4e-4701-4ba1-b1d6-5388e041fb67 */ \
+ 0xfb8cbf4e, 0x4701, 0x4ba1, { \
+ 0xb1, 0xd6, 0x53, 0x88, 0xe0, 0x41, 0xfb, 0x67 \
+ } \
+ }
+
+// component implementing nsIStreamListenerTee.
+#define NS_STREAMLISTENERTEE_CONTRACTID \
+ "@mozilla.org/network/stream-listener-tee;1"
+#define NS_STREAMLISTENERTEE_CID \
+ { /* 831f8f13-7aa8-485f-b02e-77c881cc5773 */ \
+ 0x831f8f13, 0x7aa8, 0x485f, { \
+ 0xb0, 0x2e, 0x77, 0xc8, 0x81, 0xcc, 0x57, 0x73 \
+ } \
+ }
+
+// component implementing nsIAsyncStreamCopier.
+#define NS_ASYNCSTREAMCOPIER_CONTRACTID \
+ "@mozilla.org/network/async-stream-copier;1"
+#define NS_ASYNCSTREAMCOPIER_CID \
+ { /* e746a8b1-c97a-4fc5-baa4-66607521bd08 */ \
+ 0xe746a8b1, 0xc97a, 0x4fc5, { \
+ 0xba, 0xa4, 0x66, 0x60, 0x75, 0x21, 0xbd, 0x08 \
+ } \
+ }
+
+// component implementing nsIInputStreamPump.
+#define NS_INPUTSTREAMPUMP_CONTRACTID "@mozilla.org/network/input-stream-pump;1"
+#define NS_INPUTSTREAMPUMP_CID \
+ { /* ccd0e960-7947-4635-b70e-4c661b63d675 */ \
+ 0xccd0e960, 0x7947, 0x4635, { \
+ 0xb7, 0x0e, 0x4c, 0x66, 0x1b, 0x63, 0xd6, 0x75 \
+ } \
+ }
+
+// component implementing nsIInputStreamChannel.
+#define NS_INPUTSTREAMCHANNEL_CONTRACTID \
+ "@mozilla.org/network/input-stream-channel;1"
+#define NS_INPUTSTREAMCHANNEL_CID \
+ { /* 6ddb050c-0d04-11d4-986e-00c04fa0cf4a */ \
+ 0x6ddb050c, 0x0d04, 0x11d4, { \
+ 0x98, 0x6e, 0x00, 0xc0, 0x4f, 0xa0, 0xcf, 0x4a \
+ } \
+ }
+
+// component implementing nsIStreamLoader.
+#define NS_STREAMLOADER_CONTRACTID "@mozilla.org/network/stream-loader;1"
+#define NS_STREAMLOADER_CID \
+ { /* 9879908a-2972-40c0-890b-a91dd7dfb954 */ \
+ 0x9879908a, 0x2972, 0x40c0, { \
+ 0x89, 0x0b, 0xa9, 0x1d, 0xd7, 0xdf, 0xb9, 0x54 \
+ } \
+ }
+
+// component implementing nsIStreamLoader.
+#define NS_INCREMENTALSTREAMLOADER_CONTRACTID \
+ "@mozilla.org/network/incremental-stream-loader;1"
+#define NS_INCREMENTALSTREAMLOADER_CID \
+ { /* 5d6352a3-b9c3-4fa3-87aa-b2a3c6e5a501 */ \
+ 0x5d6352a3, 0xb9c3, 0x4fa3, { \
+ 0x87, 0xaa, 0xb2, 0xa3, 0xc6, 0xe5, 0xa5, 0x01 \
+ } \
+ }
+
+// component implementing nsIUnicharStreamLoader.
+#define NS_UNICHARSTREAMLOADER_CONTRACTID \
+ "@mozilla.org/network/unichar-stream-loader;1"
+#define NS_UNICHARSTREAMLOADER_CID \
+ { /* 9445791f-fa4c-4669-b174-df5032bb67b3 */ \
+ 0x9445791f, 0xfa4c, 0x4669, { \
+ 0xb1, 0x74, 0xdf, 0x50, 0x32, 0xbb, 0x67, 0xb3 \
+ } \
+ }
+
+// component implementing nsIDownloader.
+#define NS_DOWNLOADER_CONTRACTID "@mozilla.org/network/downloader;1"
+#define NS_DOWNLOADER_CID \
+ { /* 510a86bb-6019-4ed1-bb4f-965cffd23ece */ \
+ 0x510a86bb, 0x6019, 0x4ed1, { \
+ 0xbb, 0x4f, 0x96, 0x5c, 0xff, 0xd2, 0x3e, 0xce \
+ } \
+ }
+
+// component implementing nsIBackgroundFileSaver and
+// nsIOutputStream.
+#define NS_BACKGROUNDFILESAVEROUTPUTSTREAM_CONTRACTID \
+ "@mozilla.org/network/background-file-saver;1?mode=outputstream"
+#define NS_BACKGROUNDFILESAVEROUTPUTSTREAM_CID \
+ { /* 62147d1e-ef6a-40e8-aaf8-d039f5caaa81 */ \
+ 0x62147d1e, 0xef6a, 0x40e8, { \
+ 0xaa, 0xf8, 0xd0, 0x39, 0xf5, 0xca, 0xaa, 0x81 \
+ } \
+ }
+
+// component implementing nsIBackgroundFileSaver and
+// nsIStreamListener.
+#define NS_BACKGROUNDFILESAVERSTREAMLISTENER_CONTRACTID \
+ "@mozilla.org/network/background-file-saver;1?mode=streamlistener"
+#define NS_BACKGROUNDFILESAVERSTREAMLISTENER_CID \
+ { /* 208de7fc-a781-4031-bbae-cc0de539f61a */ \
+ 0x208de7fc, 0xa781, 0x4031, { \
+ 0xbb, 0xae, 0xcc, 0x0d, 0xe5, 0x39, 0xf6, 0x1a \
+ } \
+ }
+
+// component implementing nsIIncrementalDownload.
+#define NS_INCREMENTALDOWNLOAD_CONTRACTID \
+ "@mozilla.org/network/incremental-download;1"
+
+// component implementing nsISystemProxySettings.
+#define NS_SYSTEMPROXYSETTINGS_CONTRACTID "@mozilla.org/system-proxy-settings;1"
+
+// component implementing nsIDHCPClient.
+#define NS_DHCPCLIENT_CONTRACTID "@mozilla.org/dhcp-client;1"
+
+// service implementing nsIStreamTransportService
+#define NS_STREAMTRANSPORTSERVICE_CONTRACTID \
+ "@mozilla.org/network/stream-transport-service;1"
+#define NS_STREAMTRANSPORTSERVICE_CID \
+ { /* 0885d4f8-f7b8-4cda-902e-94ba38bc256e */ \
+ 0x0885d4f8, 0xf7b8, 0x4cda, { \
+ 0x90, 0x2e, 0x94, 0xba, 0x38, 0xbc, 0x25, 0x6e \
+ } \
+ }
+
+// service implementing nsISocketTransportService
+#define NS_SOCKETTRANSPORTSERVICE_CONTRACTID \
+ "@mozilla.org/network/socket-transport-service;1"
+#define NS_SOCKETTRANSPORTSERVICE_CID \
+ { /* ad56b25f-e6bb-4db3-9f7b-5b7db33fd2b1 */ \
+ 0xad56b25f, 0xe6bb, 0x4db3, { \
+ 0x9f, 0x7b, 0x5b, 0x7d, 0xb3, 0x3f, 0xd2, 0xb1 \
+ } \
+ }
+
+// component implementing nsIServerSocket
+#define NS_SERVERSOCKET_CONTRACTID "@mozilla.org/network/server-socket;1"
+#define NS_SERVERSOCKET_CID \
+ { /* 2ec62893-3b35-48fa-ab1d-5e68a9f45f08 */ \
+ 0x2ec62893, 0x3b35, 0x48fa, { \
+ 0xab, 0x1d, 0x5e, 0x68, 0xa9, 0xf4, 0x5f, 0x08 \
+ } \
+ }
+
+// component implementing nsITLSServerSocket
+#define NS_TLSSERVERSOCKET_CONTRACTID "@mozilla.org/network/tls-server-socket;1"
+#define NS_TLSSERVERSOCKET_CID \
+ { /* 1813cbb4-c98e-4622-8c7d-839167f3f272 */ \
+ 0x1813cbb4, 0xc98e, 0x4622, { \
+ 0x8c, 0x7d, 0x83, 0x91, 0x67, 0xf3, 0xf2, 0x72 \
+ } \
+ }
+
+// component implementing nsIUDPSocket
+#define NS_UDPSOCKET_CONTRACTID "@mozilla.org/network/udp-socket;1"
+#define NS_UDPSOCKET_CID \
+ { /* c9f74572-7b8e-4fec-bb4a-03c0d3021bd6 */ \
+ 0xc9f74572, 0x7b8e, 0x4fec, { \
+ 0xbb, 0x4a, 0x03, 0xc0, 0xd3, 0x02, 0x1b, 0xd6 \
+ } \
+ }
+
+#define NS_LOCALFILEINPUTSTREAM_CONTRACTID \
+ "@mozilla.org/network/file-input-stream;1"
+#define NS_LOCALFILEINPUTSTREAM_CID \
+ { /* be9a53ae-c7e9-11d3-8cda-0060b0fc14a3 */ \
+ 0xbe9a53ae, 0xc7e9, 0x11d3, { \
+ 0x8c, 0xda, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 \
+ } \
+ }
+
+#define NS_LOCALFILEOUTPUTSTREAM_CONTRACTID \
+ "@mozilla.org/network/file-output-stream;1"
+#define NS_LOCALFILEOUTPUTSTREAM_CID \
+ { /* c272fee0-c7e9-11d3-8cda-0060b0fc14a3 */ \
+ 0xc272fee0, 0xc7e9, 0x11d3, { \
+ 0x8c, 0xda, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 \
+ } \
+ }
+
+#define NS_LOCALFILERANDOMACCESSSTREAM_CONTRACTID \
+ "@mozilla.org/network/file-random-access-stream;1"
+#define NS_LOCALFILERANDOMACCESSSTREAM_CID \
+ { /* 648705e9-757a-4d4b-a5bF-0248e512c309 */ \
+ 0x648705e9, 0x757a, 0x4d4b, { \
+ 0xa5, 0xbF, 0x02, 0x48, 0xe5, 0x12, 0xc3, 0x09 \
+ } \
+ }
+
+#define NS_BUFFEREDINPUTSTREAM_CONTRACTID \
+ "@mozilla.org/network/buffered-input-stream;1"
+#define NS_BUFFEREDINPUTSTREAM_CID \
+ { /* 9226888e-da08-11d3-8cda-0060b0fc14a3 */ \
+ 0x9226888e, 0xda08, 0x11d3, { \
+ 0x8c, 0xda, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 \
+ } \
+ }
+
+#define NS_BUFFEREDOUTPUTSTREAM_CONTRACTID \
+ "@mozilla.org/network/buffered-output-stream;1"
+#define NS_BUFFEREDOUTPUTSTREAM_CID \
+ { /* 9868b4ce-da08-11d3-8cda-0060b0fc14a3 */ \
+ 0x9868b4ce, 0xda08, 0x11d3, { \
+ 0x8c, 0xda, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 \
+ } \
+ }
+
+// components implementing nsISafeOutputStream
+#define NS_ATOMICLOCALFILEOUTPUTSTREAM_CONTRACTID \
+ "@mozilla.org/network/atomic-file-output-stream;1"
+#define NS_ATOMICLOCALFILEOUTPUTSTREAM_CID \
+ { /* 6EAE857E-4BA9-11E3-9B39-B4036188709B */ \
+ 0x6EAE857E, 0x4BA9, 0x11E3, { \
+ 0x9b, 0x39, 0xb4, 0x03, 0x61, 0x88, 0x70, 0x9b \
+ } \
+ }
+
+#define NS_SAFELOCALFILEOUTPUTSTREAM_CONTRACTID \
+ "@mozilla.org/network/safe-file-output-stream;1"
+#define NS_SAFELOCALFILEOUTPUTSTREAM_CID \
+ { /* a181af0d-68b8-4308-94db-d4f859058215 */ \
+ 0xa181af0d, 0x68b8, 0x4308, { \
+ 0x94, 0xdb, 0xd4, 0xf8, 0x59, 0x05, 0x82, 0x15 \
+ } \
+ }
+
+/**
+ * Contract ID for a service implementing nsIURIClassifier that identifies
+ * phishing and malware sites.
+ */
+#define NS_URICLASSIFIERSERVICE_CONTRACTID "@mozilla.org/uriclassifierservice"
+
+// service implementing nsINetworkPredictor
+#define NS_NETWORKPREDICTOR_CONTRACTID "@mozilla.org/network/predictor;1"
+#define NS_NETWORKPREDICTOR_CID \
+ { /* {969adfdf-7221-4419-aecf-05f8faf00c9b} */ \
+ 0x969adfdf, 0x7221, 0x4419, { \
+ 0xae, 0xcf, 0x05, 0xf8, 0xfa, 0xf0, 0x0c, 0x9b \
+ } \
+ }
+
+// captive portal service implementing nsICaptivePortalService
+#define NS_CAPTIVEPORTAL_CONTRACTID \
+ "@mozilla.org/network/captive-portal-service;1"
+#define NS_CAPTIVEPORTAL_CID \
+ { /* bdbe0555-fc3d-4f7b-9205-c309ceb2d641 */ \
+ 0xbdbe0555, 0xfc3d, 0x4f7b, { \
+ 0x92, 0x05, 0xc3, 0x09, 0xce, 0xb2, 0xd6, 0x41 \
+ } \
+ }
+
+#define NS_NETWORKCONNECTIVITYSERVICE_CONTRACTID \
+ "@mozilla.org/network/network-connectivity-service;1"
+#define NS_NETWORKCONNECTIVITYSERVICE_CID \
+ { /* 2693457e-3ba5-4455-991f-5350946adb12 */ \
+ 0x2693457e, 0x3ba5, 0x4455, { \
+ 0x99, 0x1f, 0x53, 0x50, 0x94, 0x6a, 0xdb, 0x12 \
+ } \
+ }
+
+/******************************************************************************
+ * netwerk/cache2/ classes
+ */
+
+// service implementing nsICacheService.
+#define NS_CACHESERVICE_CONTRACTID "@mozilla.org/network/cache-service;1"
+#define NS_CACHESERVICE_CID \
+ { /* 6c84aec9-29a5-4264-8fbc-bee8f922ea67 */ \
+ 0x6c84aec9, 0x29a5, 0x4264, { \
+ 0x8f, 0xbc, 0xbe, 0xe8, 0xf9, 0x22, 0xea, 0x67 \
+ } \
+ }
+
+/******************************************************************************
+ * netwerk/protocol/http/ classes
+ */
+
+#define NS_HTTPPROTOCOLHANDLER_CID \
+ { /* 4f47e42e-4d23-4dd3-bfda-eb29255e9ea3 */ \
+ 0x4f47e42e, 0x4d23, 0x4dd3, { \
+ 0xbf, 0xda, 0xeb, 0x29, 0x25, 0x5e, 0x9e, 0xa3 \
+ } \
+ }
+
+#define NS_HTTPSPROTOCOLHANDLER_CID \
+ { /* dccbe7e4-7750-466b-a557-5ea36c8ff24e */ \
+ 0xdccbe7e4, 0x7750, 0x466b, { \
+ 0xa5, 0x57, 0x5e, 0xa3, 0x6c, 0x8f, 0xf2, 0x4e \
+ } \
+ }
+
+#define NS_HTTPBASICAUTH_CID \
+ { /* fca3766a-434a-4ae7-83cf-0909e18a093a */ \
+ 0xfca3766a, 0x434a, 0x4ae7, { \
+ 0x83, 0xcf, 0x09, 0x09, 0xe1, 0x8a, 0x09, 0x3a \
+ } \
+ }
+
+#define NS_HTTPDIGESTAUTH_CID \
+ { /* 17491ba4-1dd2-11b2-aae3-de6b92dab620 */ \
+ 0x17491ba4, 0x1dd2, 0x11b2, { \
+ 0xaa, 0xe3, 0xde, 0x6b, 0x92, 0xda, 0xb6, 0x20 \
+ } \
+ }
+
+#define NS_HTTPNTLMAUTH_CID \
+ { /* bbef8185-c628-4cc1-b53e-e61e74c2451a */ \
+ 0xbbef8185, 0xc628, 0x4cc1, { \
+ 0xb5, 0x3e, 0xe6, 0x1e, 0x74, 0xc2, 0x45, 0x1a \
+ } \
+ }
+
+#define NS_HTTPAUTHMANAGER_CONTRACTID "@mozilla.org/network/http-auth-manager;1"
+#define NS_HTTPAUTHMANAGER_CID \
+ { /* 36b63ef3-e0fa-4c49-9fd4-e065e85568f4 */ \
+ 0x36b63ef3, 0xe0fa, 0x4c49, { \
+ 0x9f, 0xd4, 0xe0, 0x65, 0xe8, 0x55, 0x68, 0xf4 \
+ } \
+ }
+
+#define NS_HTTPACTIVITYDISTRIBUTOR_CONTRACTID \
+ "@mozilla.org/network/http-activity-distributor;1"
+#define NS_HTTPACTIVITYDISTRIBUTOR_CID \
+ { /* 15629ada-a41c-4a09-961f-6553cd60b1a2 */ \
+ 0x15629ada, 0xa41c, 0x4a09, { \
+ 0x96, 0x1f, 0x65, 0x53, 0xcd, 0x60, 0xb1, 0xa2 \
+ } \
+ }
+
+#define NS_THROTTLEQUEUE_CONTRACTID "@mozilla.org/network/throttlequeue;1"
+#define NS_THROTTLEQUEUE_CID \
+ { /* 4c39159c-cd90-4dd3-97a7-06af5e6d84c4 */ \
+ 0x4c39159c, 0xcd90, 0x4dd3, { \
+ 0x97, 0xa7, 0x06, 0xaf, 0x5e, 0x6d, 0x84, 0xc4 \
+ } \
+ }
+
+/******************************************************************************
+ * netwerk/protocol/res/ classes
+ */
+
+#define NS_RESPROTOCOLHANDLER_CID \
+ { /* e64f152a-9f07-11d3-8cda-0060b0fc14a3 */ \
+ 0xe64f152a, 0x9f07, 0x11d3, { \
+ 0x8c, 0xda, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 \
+ } \
+ }
+
+#define NS_EXTENSIONPROTOCOLHANDLER_CID \
+ { /* aea16cd0-f020-4138-b068-0716c4a15b5a */ \
+ 0xaea16cd0, 0xf020, 0x4138, { \
+ 0xb0, 0x68, 0x07, 0x16, 0xc4, 0xa1, 0x5b, 0x5a \
+ } \
+ }
+
+#define NS_SUBSTITUTINGURL_CID \
+ { \
+ 0xdea9657c, 0x18cf, 0x4984, { \
+ 0xbd, 0xe9, 0xcc, 0xef, 0x5d, 0x8a, 0xb4, 0x73 \
+ } \
+ }
+
+#define NS_SUBSTITUTINGURLMUTATOR_CID \
+ { \
+ 0xb3cfeb91, 0x332a, 0x46c9, { \
+ 0xad, 0x97, 0x93, 0xff, 0x39, 0x84, 0x14, 0x94 \
+ } \
+ }
+
+#define NS_SUBSTITUTINGJARURI_CID \
+ { /* 50d50ddf-f16a-4652-8705-936b19c3763b */ \
+ 0x50d50ddf, 0xf16a, 0x4652, { \
+ 0x87, 0x05, 0x93, 0x6b, 0x19, 0xc3, 0x76, 0x3b \
+ } \
+ }
+
+/******************************************************************************
+ * netwerk/protocol/file/ classes
+ */
+
+#define NS_FILEPROTOCOLHANDLER_CID \
+ { /* fbc81170-1f69-11d3-9344-00104ba0fd40 */ \
+ 0xfbc81170, 0x1f69, 0x11d3, { \
+ 0x93, 0x44, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 \
+ } \
+ }
+
+/******************************************************************************
+ * netwerk/protocol/data/ classes
+ */
+
+#define NS_DATAPROTOCOLHANDLER_CID \
+ { /* {B6ED3030-6183-11d3-A178-0050041CAF44} */ \
+ 0xb6ed3030, 0x6183, 0x11d3, { \
+ 0xa1, 0x78, 0x00, 0x50, 0x04, 0x1c, 0xaf, 0x44 \
+ } \
+ }
+
+/******************************************************************************
+ * netwerk/protocol/viewsource/ classes
+ */
+
+// service implementing nsIProtocolHandler
+#define NS_VIEWSOURCEHANDLER_CID \
+ { /* {0x9c7ec5d1-23f9-11d5-aea8-8fcc0793e97f} */ \
+ 0x9c7ec5d1, 0x23f9, 0x11d5, { \
+ 0xae, 0xa8, 0x8f, 0xcc, 0x07, 0x93, 0xe9, 0x7f \
+ } \
+ }
+
+/******************************************************************************
+ * netwerk/protocol/websocket/ classes
+ */
+
+#define NS_WEBSOCKETPROTOCOLHANDLER_CID \
+ { /* {dc01db59-a513-4c90-824b-085cce06c0aa} */ \
+ 0xdc01db59, 0xa513, 0x4c90, { \
+ 0x82, 0x4b, 0x08, 0x5c, 0xce, 0x06, 0xc0, 0xaa \
+ } \
+ }
+
+#define NS_WEBSOCKETSSLPROTOCOLHANDLER_CID \
+ { /* {dc01dbbb-a5bb-4cbb-82bb-085cce06c0bb} */ \
+ 0xdc01dbbb, 0xa5bb, 0x4cbb, { \
+ 0x82, 0xbb, 0x08, 0x5c, 0xce, 0x06, 0xc0, 0xbb \
+ } \
+ }
+
+/******************************************************************************
+ * netwerk/protocol/about/ classes
+ */
+
+#define NS_ABOUTPROTOCOLHANDLER_CID \
+ { /* 9e3b6c90-2f75-11d3-8cd0-0060b0fc14a3 */ \
+ 0x9e3b6c90, 0x2f75, 0x11d3, { \
+ 0x8c, 0xd0, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 \
+ } \
+ }
+
+#define NS_SAFEABOUTPROTOCOLHANDLER_CID \
+ { /* 1423e739-782c-4081-b5d8-fe6fba68c0ef */ \
+ 0x1423e739, 0x782c, 0x4081, { \
+ 0xb5, 0xd8, 0xfe, 0x6f, 0xba, 0x68, 0xc0, 0xef \
+ } \
+ }
+
+/******************************************************************************
+ * netwerk/dns/ classes
+ */
+
+#define NS_DNSSERVICE_CONTRACTID "@mozilla.org/network/dns-service;1"
+#define NS_DNSSERVICE_CID \
+ { /* b0ff4572-dae4-4bef-a092-83c1b88f6be9 */ \
+ 0xb0ff4572, 0xdae4, 0x4bef, { \
+ 0xa0, 0x92, 0x83, 0xc1, 0xb8, 0x8f, 0x6b, 0xe9 \
+ } \
+ }
+
+/* ContractID of the XPCOM package that implements nsIIDNService */
+#define NS_IDNSERVICE_CONTRACTID "@mozilla.org/network/idn-service;1"
+#define NS_IDNSERVICE_CID \
+ { /* 62b778a6-bce3-456b-8c31-2865fbb68c91 */ \
+ 0x62b778a6, 0xbce3, 0x456b, { \
+ 0x8c, 0x31, 0x28, 0x65, 0xfb, 0xb6, 0x8c, 0x91 \
+ } \
+ }
+
+#define NS_EFFECTIVETLDSERVICE_CONTRACTID \
+ "@mozilla.org/network/effective-tld-service;1"
+#define NS_EFFECTIVETLDSERVICE_CID \
+ { /* cb9abbae-66b6-4609-8594-5c4ff300888e */ \
+ 0xcb9abbae, 0x66b6, 0x4609, { \
+ 0x85, 0x94, 0x5c, 0x4f, 0xf3, 0x00, 0x88, 0x8e \
+ } \
+ }
+
+/******************************************************************************
+ * netwerk/mime classes
+ */
+
+// {1F4DBCF7-245C-4c8c-943D-8A1DA0495E8A}
+#define NS_MIMEHEADERPARAM_CID \
+ { \
+ 0x1f4dbcf7, 0x245c, 0x4c8c, { \
+ 0x94, 0x3d, 0x8a, 0x1d, 0xa0, 0x49, 0x5e, 0x8a \
+ } \
+ }
+
+#define NS_MIMEHEADERPARAM_CONTRACTID "@mozilla.org/network/mime-hdrparam;1"
+
+/******************************************************************************
+ * netwerk/socket classes
+ */
+
+#define NS_SOCKSSOCKETPROVIDER_CID \
+ { /* 8dbe7246-1dd2-11b2-9b8f-b9a849e4403a */ \
+ 0x8dbe7246, 0x1dd2, 0x11b2, { \
+ 0x9b, 0x8f, 0xb9, 0xa8, 0x49, 0xe4, 0x40, 0x3a \
+ } \
+ }
+
+#define NS_SOCKS4SOCKETPROVIDER_CID \
+ { /* F7C9F5F4-4451-41c3-A28A-5BA2447FBACE */ \
+ 0xf7c9f5f4, 0x4451, 0x41c3, { \
+ 0xa2, 0x8a, 0x5b, 0xa2, 0x44, 0x7f, 0xba, 0xce \
+ } \
+ }
+
+#define NS_UDPSOCKETPROVIDER_CID \
+ { /* 320706D2-2E81-42c6-89C3-8D83B17D3FB4 */ \
+ 0x320706d2, 0x2e81, 0x42c6, { \
+ 0x89, 0xc3, 0x8d, 0x83, 0xb1, 0x7d, 0x3f, 0xb4 \
+ } \
+ }
+
+#define NS_DASHBOARD_CONTRACTID "@mozilla.org/network/dashboard;1"
+#define NS_DASHBOARD_CID \
+ { /*c79eb3c6-091a-45a6-8544-5a8d1ab79537 */ \
+ 0xc79eb3c6, 0x091a, 0x45a6, { \
+ 0x85, 0x44, 0x5a, 0x8d, 0x1a, 0xb7, 0x95, 0x37 \
+ } \
+ }
+
+/******************************************************************************
+ * netwerk/cookie classes
+ */
+
+// service implementing nsICookieManager
+#define NS_COOKIEMANAGER_CONTRACTID "@mozilla.org/cookiemanager;1"
+#define NS_COOKIEMANAGER_CID \
+ { /* aaab6710-0f2c-11d5-a53b-0010a401eb10 */ \
+ 0xaaab6710, 0x0f2c, 0x11d5, { \
+ 0xa5, 0x3b, 0x00, 0x10, 0xa4, 0x01, 0xeb, 0x10 \
+ } \
+ }
+
+// service implementing nsICookieService.
+#define NS_COOKIESERVICE_CONTRACTID "@mozilla.org/cookieService;1"
+#define NS_COOKIESERVICE_CID \
+ { /* c375fa80-150f-11d6-a618-0010a401eb10 */ \
+ 0xc375fa80, 0x150f, 0x11d6, { \
+ 0xa6, 0x18, 0x00, 0x10, 0xa4, 0x01, 0xeb, 0x10 \
+ } \
+ }
+
+/******************************************************************************
+ * netwerk/wifi classes
+ */
+#ifdef NECKO_WIFI
+# define NS_WIFI_MONITOR_CONTRACTID "@mozilla.org/wifi/monitor;1"
+
+# define NS_WIFI_MONITOR_COMPONENT_CID \
+ { \
+ 0x3FF8FB9F, 0xEE63, 0x48DF, { \
+ 0x89, 0xF0, 0xDA, 0xCE, 0x02, 0x42, 0xFD, 0x82 \
+ } \
+ }
+#endif
+
+/******************************************************************************
+ * netwerk/streamconv classes
+ */
+
+// service implementing nsIStreamConverterService
+#define NS_STREAMCONVERTERSERVICE_CONTRACTID "@mozilla.org/streamConverters;1"
+#define NS_STREAMCONVERTERSERVICE_CID \
+ { /* 892FFEB0-3F80-11d3-A16C-0050041CAF44 */ \
+ 0x892ffeb0, 0x3f80, 0x11d3, { \
+ 0xa1, 0x6c, 0x00, 0x50, 0x04, 0x1c, 0xaf, 0x44 \
+ } \
+ }
+
+/**
+ * Detector that can act as either an nsIStreamConverter or an
+ * nsIContentSniffer to decide whether text/plain data is "really" text/plain
+ * or APPLICATION_GUESS_FROM_EXT. Use with CreateInstance.
+ */
+#define NS_BINARYDETECTOR_CONTRACTID "@mozilla.org/network/binary-detector;1"
+
+/******************************************************************************
+ * netwerk/system classes
+ */
+
+// service implementing nsINetworkLinkService
+#define NS_NETWORK_LINK_SERVICE_CID \
+ { \
+ 0x75a500a2, 0x0030, 0x40f7, { \
+ 0x86, 0xf8, 0x63, 0xf2, 0x25, 0xb9, 0x40, 0xae \
+ } \
+ }
+
+/******************************************************************************
+ * Contracts that can be implemented by necko users.
+ */
+
+/**
+ * This contract ID will be gotten as a service implementing
+ * nsINetworkLinkService and monitored by IOService for automatic online/offline
+ * management.
+ *
+ * Must implement nsINetworkLinkService
+ */
+#define NS_NETWORK_LINK_SERVICE_CONTRACTID \
+ "@mozilla.org/network/network-link-service;1"
+
+/**
+ * This contract ID is used when Necko needs to wrap an nsIAuthPrompt as
+ * nsIAuthPrompt2. Implementing it is required for backwards compatibility
+ * with Versions before 1.9.
+ *
+ * Must implement nsIAuthPromptAdapterFactory
+ */
+#define NS_AUTHPROMPT_ADAPTER_FACTORY_CONTRACTID \
+ "@mozilla.org/network/authprompt-adapter-factory;1"
+
+/**
+ * Must implement nsICryptoHash.
+ */
+#define NS_CRYPTO_HASH_CONTRACTID "@mozilla.org/security/hash;1"
+
+/******************************************************************************
+ * Categories
+ */
+/**
+ * Services registered in this category will get notified via
+ * nsIChannelEventSink about all redirects that happen and have the opportunity
+ * to veto them. The value of the category entries is interpreted as the
+ * contract ID of the service.
+ */
+#define NS_CHANNEL_EVENT_SINK_CATEGORY "net-channel-event-sinks"
+
+/**
+ * Services in this category will get told about each load that happens and get
+ * the opportunity to override the detected MIME type via nsIContentSniffer.
+ * Services should not set the MIME type on the channel directly, but return the
+ * new type. If getMIMETypeFromContent throws an exception, the type will remain
+ * unchanged.
+ *
+ * Note that only channels with the LOAD_CALL_CONTENT_SNIFFERS flag will call
+ * content sniffers. Also note that there can be security implications about
+ * changing the MIME type -- proxies filtering responses based on their MIME
+ * type might consider certain types to be safe, which these sniffers can
+ * override.
+ *
+ * Not all channels may implement content sniffing. See also
+ * nsIChannel::LOAD_CALL_CONTENT_SNIFFERS.
+ */
+#define NS_CONTENT_SNIFFER_CATEGORY "net-content-sniffers"
+
+/**
+ * Services in this category can sniff content that is not necessarily loaded
+ * from the network, and they won't be told about each load.
+ */
+#define NS_DATA_SNIFFER_CATEGORY "content-sniffing-services"
+
+/**
+ * Services in this category similar to "net-content-sniffers" but it's
+ * initiated by the opaque response blocking algorithm.
+ */
+#define NS_ORB_SNIFFER_CATEGORY "orb-content-sniffers"
+
+/**
+ * Services in this category are the union of "net-content-sniffers" and
+ * "orb-content-sniffers".
+ */
+#define NS_CONTENT_AND_ORB_SNIFFER_CATEGORY "net-and-orb-content-sniffers"
+
+/**
+ * Must implement nsINSSErrorsService.
+ */
+#define NS_NSS_ERRORS_SERVICE_CONTRACTID "@mozilla.org/nss_errors_service;1"
+
+/**
+ * LoadContextInfo factory
+ */
+#define NS_NSILOADCONTEXTINFOFACTORY_CONTRACTID \
+ "@mozilla.org/load-context-info-factory;1"
+#define NS_NSILOADCONTEXTINFOFACTORY_CID \
+ { /* 62d4b190-3642-4450-b019-d1c1fba56025 */ \
+ 0x62d4b190, 0x3642, 0x4450, { \
+ 0xb0, 0x19, 0xd1, 0xc1, 0xfb, 0xa5, 0x60, 0x25 \
+ } \
+ }
+
+#endif // nsNetCID_h__
diff --git a/netwerk/build/nsNetModule.cpp b/netwerk/build/nsNetModule.cpp
new file mode 100644
index 0000000000..a54275b697
--- /dev/null
+++ b/netwerk/build/nsNetModule.cpp
@@ -0,0 +1,249 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set sw=2 ts=8 et tw=80 : */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#define ALLOW_LATE_HTTPLOG_H_INCLUDE 1
+#include "base/basictypes.h"
+
+#include "nsCOMPtr.h"
+#include "nsIClassInfoImpl.h"
+#include "mozilla/Components.h"
+#include "mozilla/ModuleUtils.h"
+#include "nscore.h"
+#include "nsSimpleURI.h"
+#include "nsLoadGroup.h"
+#include "nsMimeTypes.h"
+#include "nsDNSPrefetch.h"
+#include "nsXULAppAPI.h"
+#include "nsCategoryCache.h"
+#include "nsIContentSniffer.h"
+#include "nsStandardURL.h"
+#include "mozilla/net/BackgroundChannelRegistrar.h"
+#include "mozilla/net/NeckoChild.h"
+#ifdef MOZ_AUTH_EXTENSION
+# include "nsAuthGSSAPI.h"
+#endif
+
+#include "nsNetCID.h"
+
+#if defined(XP_MACOSX) || defined(XP_WIN) || defined(XP_LINUX)
+# define BUILD_NETWORK_INFO_SERVICE 1
+#endif
+
+using namespace mozilla;
+
+using ContentSnifferCache = nsCategoryCache<nsIContentSniffer>;
+ContentSnifferCache* gNetSniffers = nullptr;
+ContentSnifferCache* gDataSniffers = nullptr;
+ContentSnifferCache* gORBSniffers = nullptr;
+ContentSnifferCache* gNetAndORBSniffers = nullptr;
+
+#define static
+using nsLoadGroup = mozilla::net::nsLoadGroup;
+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsLoadGroup, Init)
+#undef static
+
+///////////////////////////////////////////////////////////////////////////////
+// protocols
+///////////////////////////////////////////////////////////////////////////////
+
+// http/https
+#include "nsHttpHandler.h"
+#include "Http2Compression.h"
+#undef LOG
+#undef LOG_ENABLED
+#include "nsHttpAuthManager.h"
+#include "nsHttpActivityDistributor.h"
+#include "ThrottleQueue.h"
+#undef LOG
+#undef LOG_ENABLED
+
+NS_IMPL_COMPONENT_FACTORY(net::nsHttpHandler) {
+ return net::nsHttpHandler::GetInstance().downcast<nsIHttpProtocolHandler>();
+}
+
+NS_IMPL_COMPONENT_FACTORY(net::nsHttpsHandler) {
+ auto handler = MakeRefPtr<net::nsHttpsHandler>();
+
+ if (NS_FAILED(handler->Init())) {
+ return nullptr;
+ }
+ return handler.forget().downcast<nsIHttpProtocolHandler>();
+}
+
+#include "WebSocketChannel.h"
+#include "WebSocketChannelChild.h"
+namespace mozilla::net {
+static BaseWebSocketChannel* WebSocketChannelConstructor(bool aSecure) {
+ if (IsNeckoChild()) {
+ return new WebSocketChannelChild(aSecure);
+ }
+
+ if (aSecure) {
+ return new WebSocketSSLChannel;
+ }
+ return new WebSocketChannel;
+}
+
+#define WEB_SOCKET_HANDLER_CONSTRUCTOR(type, secure) \
+ nsresult type##Constructor(REFNSIID aIID, void** aResult) { \
+ RefPtr<BaseWebSocketChannel> inst; \
+ \
+ *aResult = nullptr; \
+ inst = WebSocketChannelConstructor(secure); \
+ return inst->QueryInterface(aIID, aResult); \
+ }
+
+WEB_SOCKET_HANDLER_CONSTRUCTOR(WebSocketChannel, false)
+WEB_SOCKET_HANDLER_CONSTRUCTOR(WebSocketSSLChannel, true)
+#undef WEB_SOCKET_HANDLER_CONSTRUCTOR
+} // namespace mozilla::net
+
+///////////////////////////////////////////////////////////////////////////////
+
+#include "nsStreamConverterService.h"
+#include "nsMultiMixedConv.h"
+#include "nsHTTPCompressConv.h"
+#include "mozTXTToHTMLConv.h"
+#include "nsUnknownDecoder.h"
+
+///////////////////////////////////////////////////////////////////////////////
+
+#include "nsIndexedToHTML.h"
+
+nsresult NS_NewMultiMixedConv(nsMultiMixedConv** result);
+nsresult MOZ_NewTXTToHTMLConv(mozTXTToHTMLConv** result);
+nsresult NS_NewHTTPCompressConv(mozilla::net::nsHTTPCompressConv** result);
+nsresult NS_NewStreamConv(nsStreamConverterService** aStreamConv);
+
+nsresult CreateNewStreamConvServiceFactory(REFNSIID aIID, void** aResult) {
+ if (!aResult) {
+ return NS_ERROR_INVALID_POINTER;
+ }
+ RefPtr<nsStreamConverterService> inst;
+ nsresult rv = NS_NewStreamConv(getter_AddRefs(inst));
+ if (NS_FAILED(rv)) {
+ *aResult = nullptr;
+ return rv;
+ }
+ rv = inst->QueryInterface(aIID, aResult);
+ if (NS_FAILED(rv)) {
+ *aResult = nullptr;
+ }
+ return rv;
+}
+
+nsresult CreateNewMultiMixedConvFactory(REFNSIID aIID, void** aResult) {
+ if (!aResult) {
+ return NS_ERROR_INVALID_POINTER;
+ }
+ RefPtr<nsMultiMixedConv> inst;
+ nsresult rv = NS_NewMultiMixedConv(getter_AddRefs(inst));
+ if (NS_FAILED(rv)) {
+ *aResult = nullptr;
+ return rv;
+ }
+ rv = inst->QueryInterface(aIID, aResult);
+ if (NS_FAILED(rv)) {
+ *aResult = nullptr;
+ }
+ return rv;
+}
+
+nsresult CreateNewTXTToHTMLConvFactory(REFNSIID aIID, void** aResult) {
+ if (!aResult) {
+ return NS_ERROR_INVALID_POINTER;
+ }
+ RefPtr<mozTXTToHTMLConv> inst;
+ nsresult rv = MOZ_NewTXTToHTMLConv(getter_AddRefs(inst));
+ if (NS_FAILED(rv)) {
+ *aResult = nullptr;
+ return rv;
+ }
+ rv = inst->QueryInterface(aIID, aResult);
+ if (NS_FAILED(rv)) {
+ *aResult = nullptr;
+ }
+ return rv;
+}
+
+nsresult CreateNewHTTPCompressConvFactory(REFNSIID aIID, void** aResult) {
+ if (!aResult) {
+ return NS_ERROR_INVALID_POINTER;
+ }
+ RefPtr<mozilla::net::nsHTTPCompressConv> inst;
+ nsresult rv = NS_NewHTTPCompressConv(getter_AddRefs(inst));
+ if (NS_FAILED(rv)) {
+ *aResult = nullptr;
+ return rv;
+ }
+ rv = inst->QueryInterface(aIID, aResult);
+ if (NS_FAILED(rv)) {
+ *aResult = nullptr;
+ }
+ return rv;
+}
+
+nsresult CreateNewUnknownDecoderFactory(REFNSIID aIID, void** aResult) {
+ if (!aResult) {
+ return NS_ERROR_NULL_POINTER;
+ }
+ *aResult = nullptr;
+
+ RefPtr<nsUnknownDecoder> inst = new nsUnknownDecoder();
+ return inst->QueryInterface(aIID, aResult);
+}
+
+nsresult CreateNewBinaryDetectorFactory(REFNSIID aIID, void** aResult) {
+ if (!aResult) {
+ return NS_ERROR_NULL_POINTER;
+ }
+ *aResult = nullptr;
+
+ RefPtr<nsBinaryDetector> inst = new nsBinaryDetector();
+ return inst->QueryInterface(aIID, aResult);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Module implementation for the net library
+
+// Net module startup hook
+nsresult nsNetStartup() {
+ mozilla::net::nsStandardURL::InitGlobalObjects();
+ return NS_OK;
+}
+
+// Net module shutdown hook
+void nsNetShutdown() {
+ // Release the url parser that the stdurl is holding.
+ mozilla::net::nsStandardURL::ShutdownGlobalObjects();
+
+ // Release global state used by the URL helper module.
+ net_ShutdownURLHelper();
+#ifdef XP_MACOSX
+ net_ShutdownURLHelperOSX();
+#endif
+
+ // Release DNS service reference.
+ nsDNSPrefetch::Shutdown();
+
+ // Release the Websocket Admission Manager
+ mozilla::net::WebSocketChannel::Shutdown();
+
+ mozilla::net::Http2CompressionCleanup();
+
+#ifdef MOZ_AUTH_EXTENSION
+ nsAuthGSSAPI::Shutdown();
+#endif
+
+ delete gNetSniffers;
+ gNetSniffers = nullptr;
+ delete gDataSniffers;
+ gDataSniffers = nullptr;
+ delete gORBSniffers;
+ gORBSniffers = nullptr;
+ delete gNetAndORBSniffers;
+ gNetAndORBSniffers = nullptr;
+}
diff --git a/netwerk/build/nsNetModule.h b/netwerk/build/nsNetModule.h
new file mode 100644
index 0000000000..cb3da83220
--- /dev/null
+++ b/netwerk/build/nsNetModule.h
@@ -0,0 +1,33 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef nsNetModule_h
+#define nsNetModule_h
+
+#include "nsID.h"
+
+class nsISupports;
+
+nsresult nsNetStartup();
+void nsNetShutdown();
+
+nsresult CreateNewStreamConvServiceFactory(const nsIID& aIID, void** aResult);
+nsresult CreateNewMultiMixedConvFactory(const nsIID& aIID, void** aResult);
+nsresult CreateNewTXTToHTMLConvFactory(const nsIID& aIID, void** aResult);
+nsresult CreateNewHTTPCompressConvFactory(const nsIID& aIID, void** aResult);
+nsresult CreateNewUnknownDecoderFactory(const nsIID& aIID, void** aResult);
+nsresult CreateNewBinaryDetectorFactory(const nsIID& aIID, void** aResult);
+nsresult nsLoadGroupConstructor(const nsIID& aIID, void** aResult);
+
+extern nsresult net_NewIncrementalDownload(const nsIID&, void**);
+
+namespace mozilla {
+namespace net {
+nsresult WebSocketChannelConstructor(const nsIID& aIID, void** aResult);
+nsresult WebSocketSSLChannelConstructor(const nsIID& aIID, void** aResult);
+} // namespace net
+} // namespace mozilla
+
+#endif