De-unify netwerk.

This commit is contained in:
Fedor 2020-06-10 21:11:59 +03:00
parent 1a9db0af8b
commit f05365da1e
57 changed files with 103 additions and 61 deletions

View File

@ -9,6 +9,7 @@
#include "mozilla/Assertions.h" #include "mozilla/Assertions.h"
#include "mozilla/DebugOnly.h" #include "mozilla/DebugOnly.h"
#include "mozilla/Logging.h" #include "mozilla/Logging.h"
#include "mozilla/net/DNS.h"
#include "prerror.h" #include "prerror.h"
#include "prio.h" #include "prio.h"
#include "private/pprio.h" #include "private/pprio.h"
@ -21,6 +22,8 @@
#define USEPIPE 1 #define USEPIPE 1
#endif #endif
using namespace mozilla::net;
namespace mozilla { namespace mozilla {
namespace net { namespace net {

View File

@ -35,6 +35,7 @@
#include "nsStreamUtils.h" #include "nsStreamUtils.h"
#include "nsString.h" #include "nsString.h"
#include "nsThreadUtils.h" #include "nsThreadUtils.h"
#include "nsHttpRequestHead.h"
#include "mozilla/Logging.h" #include "mozilla/Logging.h"
#include "mozilla/Preferences.h" #include "mozilla/Preferences.h"
@ -51,6 +52,7 @@
#include "mozilla/dom/ContentParent.h" #include "mozilla/dom/ContentParent.h"
using namespace mozilla; using namespace mozilla;
using namespace mozilla::dom;
namespace mozilla { namespace mozilla {
namespace net { namespace net {

View File

@ -16,6 +16,7 @@
#include "jsfriendapi.h" #include "jsfriendapi.h"
#include "prnetdb.h" #include "prnetdb.h"
#include "nsITimer.h" #include "nsITimer.h"
#include "mozilla/Mutex.h"
#include "mozilla/net/DNS.h" #include "mozilla/net/DNS.h"
#include "nsServiceManagerUtils.h" #include "nsServiceManagerUtils.h"
#include "nsNetCID.h" #include "nsNetCID.h"

View File

@ -6,7 +6,9 @@
#include "ThrottleQueue.h" #include "ThrottleQueue.h"
#include "nsISeekableStream.h" #include "nsISeekableStream.h"
#include "nsIEventTarget.h"
#include "nsIAsyncInputStream.h" #include "nsIAsyncInputStream.h"
#include "nsSocketTransportService2.h"
#include "nsStreamUtils.h" #include "nsStreamUtils.h"
#include "nsNetUtil.h" #include "nsNetUtil.h"

View File

@ -8,8 +8,10 @@
#define mozilla_net_ThrottleQueue_h #define mozilla_net_ThrottleQueue_h
#include "mozilla/TimeStamp.h" #include "mozilla/TimeStamp.h"
#include "nsCOMPtr.h"
#include "nsIThrottledInputChannel.h" #include "nsIThrottledInputChannel.h"
#include "nsITimer.h" #include "nsITimer.h"
#include "nsTArray.h"
namespace mozilla { namespace mozilla {
namespace net { namespace net {

View File

@ -180,7 +180,7 @@ EXPORTS.mozilla.net += [
'ReferrerPolicy.h', 'ReferrerPolicy.h',
] ]
UNIFIED_SOURCES += [ SOURCES += [
'ArrayBufferInputStream.cpp', 'ArrayBufferInputStream.cpp',
'BackgroundFileSaver.cpp', 'BackgroundFileSaver.cpp',
'ChannelDiverterChild.cpp', 'ChannelDiverterChild.cpp',

View File

@ -14,6 +14,7 @@
#include "mozilla/Logging.h" #include "mozilla/Logging.h"
using namespace mozilla; using namespace mozilla;
using namespace mozilla::net;
#undef LOG #undef LOG
// //

View File

@ -21,9 +21,12 @@
#include "nsProxyRelease.h" #include "nsProxyRelease.h"
#include "nsXULAppAPI.h" #include "nsXULAppAPI.h"
#include "nsContentSecurityManager.h" #include "nsContentSecurityManager.h"
#include "LoadInfo.h" #include "mozilla/LoadInfo.h"
#include "nsServiceManagerUtils.h" #include "nsServiceManagerUtils.h"
using namespace mozilla;
using namespace mozilla::net;
// This class is used to suspend a request across a function scope. // This class is used to suspend a request across a function scope.
class ScopedRequestSuspender { class ScopedRequestSuspender {
public: public:
@ -87,7 +90,7 @@ nsBaseChannel::Redirect(nsIChannel *newChannel, uint32_t redirectFlags,
nsSecurityFlags secFlags = mLoadInfo->GetSecurityFlags() & nsSecurityFlags secFlags = mLoadInfo->GetSecurityFlags() &
~nsILoadInfo::SEC_FORCE_INHERIT_PRINCIPAL; ~nsILoadInfo::SEC_FORCE_INHERIT_PRINCIPAL;
nsCOMPtr<nsILoadInfo> newLoadInfo = nsCOMPtr<nsILoadInfo> newLoadInfo =
static_cast<mozilla::LoadInfo*>(mLoadInfo.get())->CloneWithNewSecFlags(secFlags); static_cast<LoadInfo*>(mLoadInfo.get())->CloneWithNewSecFlags(secFlags);
nsCOMPtr<nsIPrincipal> uriPrincipal; nsCOMPtr<nsIPrincipal> uriPrincipal;
nsIScriptSecurityManager *sm = nsContentUtils::GetSecurityManager(); nsIScriptSecurityManager *sm = nsContentUtils::GetSecurityManager();

View File

@ -17,6 +17,7 @@
#include "nsIDOMDocument.h" #include "nsIDOMDocument.h"
#include "nsIHttpChannelInternal.h" #include "nsIHttpChannelInternal.h"
#include "nsIIOService.h" #include "nsIIOService.h"
#include "nsILoadContext.h"
#include "nsIParentChannel.h" #include "nsIParentChannel.h"
#include "nsIPermissionManager.h" #include "nsIPermissionManager.h"
#include "nsIPrivateBrowsingTrackingProtectionWhitelist.h" #include "nsIPrivateBrowsingTrackingProtectionWhitelist.h"

View File

@ -19,6 +19,9 @@
#include "nsNetCID.h" #include "nsNetCID.h"
#include <algorithm> #include <algorithm>
using namespace mozilla;
using namespace mozilla::net;
static NS_DEFINE_CID(kStreamTransportServiceCID, NS_STREAMTRANSPORTSERVICE_CID); static NS_DEFINE_CID(kStreamTransportServiceCID, NS_STREAMTRANSPORTSERVICE_CID);
// //

View File

@ -24,6 +24,7 @@
using namespace mozilla::ipc; using namespace mozilla::ipc;
using mozilla::Maybe; using mozilla::Maybe;
using mozilla::Nothing;
class nsMIMEInputStream : public nsIMIMEInputStream, class nsMIMEInputStream : public nsIMIMEInputStream,
public nsISeekableStream, public nsISeekableStream,

View File

@ -26,6 +26,7 @@
#include "nsContentUtils.h" #include "nsContentUtils.h"
#include "prprf.h" #include "prprf.h"
#include "nsReadableUtils.h" #include "nsReadableUtils.h"
#include "nsPrintfCString.h"
using mozilla::dom::EncodingUtils; using mozilla::dom::EncodingUtils;
using namespace mozilla::ipc; using namespace mozilla::ipc;

View File

@ -8,6 +8,8 @@
#include "nsThreadUtils.h" #include "nsThreadUtils.h"
#include <algorithm> #include <algorithm>
using namespace mozilla::net;
nsresult nsresult
nsSyncStreamListener::Init() nsSyncStreamListener::Init()
{ {

View File

@ -4,9 +4,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsTemporaryFileInputStream.h" #include "nsTemporaryFileInputStream.h"
#include "mozilla/ipc/InputStreamUtils.h"
#include "mozilla/Mutex.h"
#include "nsStreamUtils.h" #include "nsStreamUtils.h"
#include "private/pprio.h"
#include <algorithm> #include <algorithm>
using namespace mozilla;
using namespace mozilla::ipc;
typedef mozilla::ipc::FileDescriptor::PlatformHandleType FileHandleType; typedef mozilla::ipc::FileDescriptor::PlatformHandleType FileHandleType;
NS_IMPL_ISUPPORTS(nsTemporaryFileInputStream, NS_IMPL_ISUPPORTS(nsTemporaryFileInputStream,

View File

@ -21,7 +21,7 @@ EXPORTS += [
'nsDeleteDir.h' 'nsDeleteDir.h'
] ]
UNIFIED_SOURCES += [ SOURCES += [
'nsApplicationCacheService.cpp', 'nsApplicationCacheService.cpp',
'nsCache.cpp', 'nsCache.cpp',
'nsCacheEntry.cpp', 'nsCacheEntry.cpp',

View File

@ -10,6 +10,7 @@
#include "mozilla/Attributes.h" #include "mozilla/Attributes.h"
#include "mozilla/Sprintf.h" #include "mozilla/Sprintf.h"
#include "mozilla/ThreadLocal.h" #include "mozilla/ThreadLocal.h"
#include "mozilla/Unused.h"
#include "nsCache.h" #include "nsCache.h"
#include "nsDiskCache.h" #include "nsDiskCache.h"
@ -57,6 +58,7 @@ using namespace mozilla::storage;
using mozilla::NeckoOriginAttributes; using mozilla::NeckoOriginAttributes;
static const char OFFLINE_CACHE_DEVICE_ID[] = { "offline" }; static const char OFFLINE_CACHE_DEVICE_ID[] = { "offline" };
static NS_DEFINE_CID(kCacheServiceCID, NS_CACHESERVICE_CID);
#define LOG(args) CACHE_LOG_DEBUG(args) #define LOG(args) CACHE_LOG_DEBUG(args)

View File

@ -10,6 +10,7 @@
#include "CacheFileMetadata.h" #include "CacheFileMetadata.h"
#include "nsRefPtrHashtable.h" #include "nsRefPtrHashtable.h"
#include "nsClassHashtable.h" #include "nsClassHashtable.h"
#include "nsICacheEntry.h"
#include "mozilla/Mutex.h" #include "mozilla/Mutex.h"
class nsIInputStream; class nsIInputStream;

View File

@ -8,6 +8,7 @@
#include "CacheIndex.h" #include "CacheIndex.h"
#include "CacheIndexIterator.h" #include "CacheIndexIterator.h"
#include "CacheFileUtils.h" #include "CacheFileUtils.h"
#include "CacheObserver.h"
#include "nsIFile.h" #include "nsIFile.h"
#include "LoadContextInfo.h" #include "LoadContextInfo.h"
#include "nsThreadUtils.h" #include "nsThreadUtils.h"

View File

@ -5,6 +5,7 @@
#include "CacheIndex.h" #include "CacheIndex.h"
#include "CacheLog.h" #include "CacheLog.h"
#include "CacheFileUtils.h" #include "CacheFileUtils.h"
#include "CacheObserver.h"
#include "LoadContextInfo.h" #include "LoadContextInfo.h"
#include "mozilla/Tokenizer.h" #include "mozilla/Tokenizer.h"
#include "nsCOMPtr.h" #include "nsCOMPtr.h"

View File

@ -6,6 +6,7 @@
#include "mozilla/BasePrincipal.h" #include "mozilla/BasePrincipal.h"
#include "plstr.h" #include "plstr.h"
#include "mozilla/SHA1.h"
namespace mozilla { namespace mozilla {
namespace net { namespace net {

View File

@ -4,6 +4,8 @@
#include "CacheIOThread.h" #include "CacheIOThread.h"
#include "CacheFileIOManager.h" #include "CacheFileIOManager.h"
#include "CacheObserver.h"
#include "CacheLog.h"
#include "nsIRunnable.h" #include "nsIRunnable.h"
#include "nsISupportsImpl.h" #include "nsISupportsImpl.h"

View File

@ -21,7 +21,8 @@ EXPORTS += [
'CacheStorageService.h', 'CacheStorageService.h',
] ]
UNIFIED_SOURCES += [ SOURCES += [
'AppCacheStorage.cpp',
'CacheEntry.cpp', 'CacheEntry.cpp',
'CacheFile.cpp', 'CacheFile.cpp',
'CacheFileChunk.cpp', 'CacheFileChunk.cpp',
@ -43,11 +44,6 @@ UNIFIED_SOURCES += [
'OldWrappers.cpp', 'OldWrappers.cpp',
] ]
# AppCacheStorage.cpp cannot be built in unified mode because it uses plarena.h.
SOURCES += [
'AppCacheStorage.cpp',
]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/netwerk/base', '/netwerk/base',
'/netwerk/cache', '/netwerk/cache',

View File

@ -21,13 +21,10 @@ if CONFIG['NECKO_COOKIES']:
'CookieServiceChild.h', 'CookieServiceChild.h',
'CookieServiceParent.h', 'CookieServiceParent.h',
] ]
UNIFIED_SOURCES += [ SOURCES += [
'CookieServiceChild.cpp', 'CookieServiceChild.cpp',
'CookieServiceParent.cpp', 'CookieServiceParent.cpp',
'nsCookie.cpp', 'nsCookie.cpp',
]
# nsCookieService.cpp can't be unified because of symbol conflicts
SOURCES += [
'nsCookieService.cpp', 'nsCookieService.cpp',
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [

View File

@ -5,7 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
UNIFIED_SOURCES += [ SOURCES += [
'MDNSResponderOperator.cpp', 'MDNSResponderOperator.cpp',
'MDNSResponderReply.cpp', 'MDNSResponderReply.cpp',
'nsDNSServiceDiscovery.cpp', 'nsDNSServiceDiscovery.cpp',
@ -36,7 +36,7 @@ else:
'MulticastDNSAndroid.jsm', 'MulticastDNSAndroid.jsm',
] ]
UNIFIED_SOURCES += [ SOURCES += [
'nsDNSServiceInfo.cpp', 'nsDNSServiceInfo.cpp',
'nsMulticastDNSModule.cpp', 'nsMulticastDNSModule.cpp',
] ]

View File

@ -6,6 +6,7 @@
#ifndef mozilla_netwerk_dns_mdns_libmdns_nsDNSServiceDiscovery_h #ifndef mozilla_netwerk_dns_mdns_libmdns_nsDNSServiceDiscovery_h
#define mozilla_netwerk_dns_mdns_libmdns_nsDNSServiceDiscovery_h #define mozilla_netwerk_dns_mdns_libmdns_nsDNSServiceDiscovery_h
#include "MDNSResponderOperator.h"
#include "nsIDNSServiceDiscovery.h" #include "nsIDNSServiceDiscovery.h"
#include "nsCOMPtr.h" #include "nsCOMPtr.h"
#include "mozilla/RefPtr.h" #include "mozilla/RefPtr.h"

View File

@ -29,11 +29,6 @@ EXPORTS.mozilla.net += [
] ]
SOURCES += [ SOURCES += [
'nsEffectiveTLDService.cpp', # Excluded from UNIFIED_SOURCES due to special build flags.
'nsHostResolver.cpp', # Redefines LOG
]
UNIFIED_SOURCES += [
'ChildDNSService.cpp', 'ChildDNSService.cpp',
'DNS.cpp', 'DNS.cpp',
'DNSListenerProxy.cpp', 'DNSListenerProxy.cpp',
@ -41,6 +36,8 @@ UNIFIED_SOURCES += [
'DNSRequestParent.cpp', 'DNSRequestParent.cpp',
'GetAddrInfo.cpp', 'GetAddrInfo.cpp',
'nsDNSService2.cpp', 'nsDNSService2.cpp',
'nsEffectiveTLDService.cpp',
'nsHostResolver.cpp',
'nsIDNService.cpp', 'nsIDNService.cpp',
'punycode.c', 'punycode.c',
] ]

View File

@ -45,6 +45,8 @@
#include "nsINetworkPredictor.h" #include "nsINetworkPredictor.h"
#include "nsINetworkPredictorVerifier.h" #include "nsINetworkPredictorVerifier.h"
#include "nsISpeculativeConnect.h" #include "nsISpeculativeConnect.h"
#include "nsIOService.h"
#include "mozilla/ipc/URIUtils.h"
using mozilla::DocShellOriginAttributes; using mozilla::DocShellOriginAttributes;
using mozilla::NeckoOriginAttributes; using mozilla::NeckoOriginAttributes;

View File

@ -12,7 +12,7 @@ EXPORTS.mozilla.net += [
'NeckoParent.h', 'NeckoParent.h',
] ]
UNIFIED_SOURCES += [ SOURCES += [
'ChannelEventQueue.cpp', 'ChannelEventQueue.cpp',
'NeckoChild.cpp', 'NeckoChild.cpp',
'NeckoCommon.cpp', 'NeckoCommon.cpp',

View File

@ -14,7 +14,7 @@ EXPORTS += [
'nsAboutProtocolUtils.h', 'nsAboutProtocolUtils.h',
] ]
UNIFIED_SOURCES += [ SOURCES += [
'nsAboutBlank.cpp', 'nsAboutBlank.cpp',
'nsAboutCache.cpp', 'nsAboutCache.cpp',
'nsAboutCacheEntry.cpp', 'nsAboutCacheEntry.cpp',

View File

@ -9,6 +9,7 @@
#include "nsIAboutModule.h" #include "nsIAboutModule.h"
#include "nsICacheStorageVisitor.h" #include "nsICacheStorageVisitor.h"
#include "nsICacheStorage.h" #include "nsICacheStorage.h"
#include "nsIChannel.h"
#include "nsString.h" #include "nsString.h"
#include "nsIOutputStream.h" #include "nsIOutputStream.h"

View File

@ -9,6 +9,7 @@
#include "nsIAboutModule.h" #include "nsIAboutModule.h"
#include "nsICacheEntryOpenCallback.h" #include "nsICacheEntryOpenCallback.h"
#include "nsICacheEntry.h" #include "nsICacheEntry.h"
#include "nsIChannel.h"
#include "nsIStreamListener.h" #include "nsIStreamListener.h"
#include "nsString.h" #include "nsString.h"
#include "nsCOMPtr.h" #include "nsCOMPtr.h"

View File

@ -20,6 +20,7 @@
#include "nsIWritablePropertyBag2.h" #include "nsIWritablePropertyBag2.h"
#include "nsIChannel.h" #include "nsIChannel.h"
#include "nsIScriptError.h" #include "nsIScriptError.h"
#include "nsContentUtils.h"
namespace mozilla { namespace mozilla {
namespace net { namespace net {

View File

@ -8,7 +8,7 @@ EXPORTS.mozilla.net += [
'DataChannelParent.h', 'DataChannelParent.h',
] ]
UNIFIED_SOURCES += [ SOURCES += [
'DataChannelChild.cpp', 'DataChannelChild.cpp',
'DataChannelParent.cpp', 'DataChannelParent.cpp',
'nsDataChannel.cpp', 'nsDataChannel.cpp',

View File

@ -16,6 +16,7 @@
#include "nsEscape.h" #include "nsEscape.h"
using namespace mozilla; using namespace mozilla;
using namespace mozilla::net;
nsresult nsresult
nsDataChannel::OpenContentStream(bool async, nsIInputStream **result, nsDataChannel::OpenContentStream(bool async, nsIInputStream **result,

View File

@ -8,12 +8,12 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
EXPORTS.mozilla.net += [ EXPORTS.mozilla.net += [
'CameraStreamImpl.h', 'CameraStreamImpl.h',
] ]
UNIFIED_SOURCES += [ SOURCES += [
'AndroidCaptureProvider.cpp', 'AndroidCaptureProvider.cpp',
'CameraStreamImpl.cpp', 'CameraStreamImpl.cpp',
] ]
UNIFIED_SOURCES += [ SOURCES += [
'nsDeviceChannel.cpp', 'nsDeviceChannel.cpp',
'nsDeviceProtocolHandler.cpp', 'nsDeviceProtocolHandler.cpp',
] ]

View File

@ -15,7 +15,7 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'necko_file' XPIDL_MODULE = 'necko_file'
UNIFIED_SOURCES += [ SOURCES += [
'nsFileChannel.cpp', 'nsFileChannel.cpp',
'nsFileProtocolHandler.cpp', 'nsFileProtocolHandler.cpp',
] ]

View File

@ -28,6 +28,8 @@
#define DESKTOP_ENTRY_SECTION "Desktop Entry" #define DESKTOP_ENTRY_SECTION "Desktop Entry"
#endif #endif
using namespace mozilla::net;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
nsFileProtocolHandler::nsFileProtocolHandler() nsFileProtocolHandler::nsFileProtocolHandler()

View File

@ -20,7 +20,7 @@ EXPORTS.mozilla.net += [
'FTPChannelParent.h', 'FTPChannelParent.h',
] ]
UNIFIED_SOURCES += [ SOURCES += [
'FTPChannelChild.cpp', 'FTPChannelChild.cpp',
'FTPChannelParent.cpp', 'FTPChannelParent.cpp',
'nsFTPChannel.cpp', 'nsFTPChannel.cpp',

View File

@ -14,6 +14,9 @@ using namespace mozilla;
using namespace mozilla::net; using namespace mozilla::net;
extern LazyLogModule gFTPLog; extern LazyLogModule gFTPLog;
#undef LOG
#define LOG(args) MOZ_LOG(gFTPLog, mozilla::LogLevel::Debug, args)
// There are two transport connections established for an // There are two transport connections established for an
// ftp connection. One is used for the command channel , and // ftp connection. One is used for the command channel , and
// the other for the data channel. The command channel is the first // the other for the data channel. The command channel is the first

View File

@ -18,6 +18,7 @@
#include "nsIProxyInfo.h" #include "nsIProxyInfo.h"
#include "nsIProxiedChannel.h" #include "nsIProxiedChannel.h"
#include "nsIResumableChannel.h" #include "nsIResumableChannel.h"
#include "ADivertableParentChannel.h"
class nsIURI; class nsIURI;
using mozilla::net::ADivertableParentChannel; using mozilla::net::ADivertableParentChannel;

View File

@ -19,6 +19,7 @@
#include "nsHttpChannel.h" #include "nsHttpChannel.h"
#include "nsIHttpPushListener.h" #include "nsIHttpPushListener.h"
#include "nsString.h" #include "nsString.h"
#include "nsSocketTransportService2.h"
namespace mozilla { namespace mozilla {
namespace net { namespace net {

View File

@ -11,6 +11,7 @@
#include "mozilla/net/HttpBaseChannel.h" #include "mozilla/net/HttpBaseChannel.h"
#include "nsHttpHandler.h" #include "nsHttpHandler.h"
#include "nsHttpChannel.h"
#include "nsMimeTypes.h" #include "nsMimeTypes.h"
#include "nsNetCID.h" #include "nsNetCID.h"
#include "nsNetUtil.h" #include "nsNetUtil.h"

View File

@ -18,6 +18,7 @@
#include "mozilla/net/NeckoChild.h" #include "mozilla/net/NeckoChild.h"
#include "mozilla/net/HttpChannelChild.h" #include "mozilla/net/HttpChannelChild.h"
#include "AltDataOutputStreamChild.h"
#include "nsISupportsPrimitives.h" #include "nsISupportsPrimitives.h"
#include "nsChannelClassifier.h" #include "nsChannelClassifier.h"
#include "nsStringStream.h" #include "nsStringStream.h"

View File

@ -24,6 +24,7 @@
#include "nsIAssociatedContentSecurity.h" #include "nsIAssociatedContentSecurity.h"
#include "nsIApplicationCacheService.h" #include "nsIApplicationCacheService.h"
#include "mozilla/ipc/InputStreamUtils.h" #include "mozilla/ipc/InputStreamUtils.h"
#include "mozilla/ipc/IPCStreamUtils.h"
#include "mozilla/ipc/URIUtils.h" #include "mozilla/ipc/URIUtils.h"
#include "SerializedLoadContext.h" #include "SerializedLoadContext.h"
#include "nsIAuthInformation.h" #include "nsIAuthInformation.h"
@ -40,6 +41,8 @@
#include "nsIWindowWatcher.h" #include "nsIWindowWatcher.h"
#include "nsIDocument.h" #include "nsIDocument.h"
#include "nsStringStream.h" #include "nsStringStream.h"
#include "nsIStorageStream.h"
#include "nsStreamUtils.h"
using mozilla::BasePrincipal; using mozilla::BasePrincipal;
using namespace mozilla::dom; using namespace mozilla::dom;

View File

@ -16,6 +16,7 @@
#include "nsIHttpHeaderVisitor.h" #include "nsIHttpHeaderVisitor.h"
#include "nsIRedirectChannelRegistrar.h" #include "nsIRedirectChannelRegistrar.h"
#include "nsIPromptFactory.h" #include "nsIPromptFactory.h"
#include "nsIWindowWatcher.h"
#include "nsQueryObject.h" #include "nsQueryObject.h"
using mozilla::Unused; using mozilla::Unused;

View File

@ -43,18 +43,11 @@ EXPORTS.mozilla.net += [
'TimingStruct.h', 'TimingStruct.h',
] ]
# ASpdySession.cpp and nsHttpAuthCache cannot be built in unified mode because
# they use plarena.h.
SOURCES += [ SOURCES += [
'AlternateServices.cpp',
'ASpdySession.cpp',
'nsHttpAuthCache.cpp',
'nsHttpChannelAuthProvider.cpp', # redefines GetAuthType
]
UNIFIED_SOURCES += [
'AltDataOutputStreamChild.cpp', 'AltDataOutputStreamChild.cpp',
'AltDataOutputStreamParent.cpp', 'AltDataOutputStreamParent.cpp',
'AlternateServices.cpp',
'ASpdySession.cpp',
'CacheControlParser.cpp', 'CacheControlParser.cpp',
'ConnectionDiagnostics.cpp', 'ConnectionDiagnostics.cpp',
'Http2Compression.cpp', 'Http2Compression.cpp',
@ -70,14 +63,17 @@ UNIFIED_SOURCES += [
'nsCORSListenerProxy.cpp', 'nsCORSListenerProxy.cpp',
'nsHttp.cpp', 'nsHttp.cpp',
'nsHttpActivityDistributor.cpp', 'nsHttpActivityDistributor.cpp',
'nsHttpAuthCache.cpp',
'nsHttpAuthManager.cpp', 'nsHttpAuthManager.cpp',
'nsHttpBasicAuth.cpp', 'nsHttpBasicAuth.cpp',
'nsHttpChannel.cpp', 'nsHttpChannel.cpp',
'nsHttpChannelAuthProvider.cpp',
'nsHttpChunkedDecoder.cpp', 'nsHttpChunkedDecoder.cpp',
'nsHttpConnection.cpp', 'nsHttpConnection.cpp',
'nsHttpConnectionInfo.cpp', 'nsHttpConnectionInfo.cpp',
'nsHttpConnectionMgr.cpp', 'nsHttpConnectionMgr.cpp',
'nsHttpDigestAuth.cpp', 'nsHttpDigestAuth.cpp',
'nsHttpHandler.cpp',
'nsHttpHeaderArray.cpp', 'nsHttpHeaderArray.cpp',
'nsHttpNTLMAuth.cpp', 'nsHttpNTLMAuth.cpp',
'nsHttpPipeline.cpp', 'nsHttpPipeline.cpp',
@ -89,11 +85,6 @@ UNIFIED_SOURCES += [
'TunnelUtils.cpp', 'TunnelUtils.cpp',
] ]
# These files cannot be built in unified mode because of OS X headers.
SOURCES += [
'nsHttpHandler.cpp',
]
IPDL_SOURCES += [ IPDL_SOURCES += [
'PAltDataOutputStream.ipdl', 'PAltDataOutputStream.ipdl',
'PHttpChannel.ipdl', 'PHttpChannel.ipdl',

View File

@ -23,6 +23,7 @@
#include "nsICryptoHash.h" #include "nsICryptoHash.h"
#include "nsINetworkInterceptController.h" #include "nsINetworkInterceptController.h"
#include "nsINSSErrorsService.h" #include "nsINSSErrorsService.h"
#include "nsIScriptError.h"
#include "nsIStringBundle.h" #include "nsIStringBundle.h"
#include "nsIStreamListenerTee.h" #include "nsIStreamListenerTee.h"
#include "nsISeekableStream.h" #include "nsISeekableStream.h"

View File

@ -35,7 +35,10 @@ class nsIHttpChannelAuthProvider;
class nsInputStreamPump; class nsInputStreamPump;
class nsISSLStatus; class nsISSLStatus;
namespace mozilla { namespace net { namespace mozilla {
namespace net {
bool WillRedirect(nsHttpResponseHead * response);
class Http2PushedStream; class Http2PushedStream;

View File

@ -11,7 +11,7 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'necko_res' XPIDL_MODULE = 'necko_res'
UNIFIED_SOURCES += [ SOURCES += [
'ExtensionProtocolHandler.cpp', 'ExtensionProtocolHandler.cpp',
'nsResProtocolHandler.cpp', 'nsResProtocolHandler.cpp',
'SubstitutingProtocolHandler.cpp', 'SubstitutingProtocolHandler.cpp',

View File

@ -10,7 +10,7 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'necko_viewsource' XPIDL_MODULE = 'necko_viewsource'
UNIFIED_SOURCES += [ SOURCES += [
'nsViewSourceChannel.cpp', 'nsViewSourceChannel.cpp',
'nsViewSourceHandler.cpp', 'nsViewSourceHandler.cpp',
] ]

View File

@ -15,7 +15,7 @@ EXPORTS.mozilla.net += [
'WyciwygChannelParent.h', 'WyciwygChannelParent.h',
] ]
UNIFIED_SOURCES += [ SOURCES += [
'nsWyciwyg.cpp', 'nsWyciwyg.cpp',
'nsWyciwygChannel.cpp', 'nsWyciwygChannel.cpp',
'nsWyciwygProtocolHandler.cpp', 'nsWyciwygProtocolHandler.cpp',

View File

@ -18,7 +18,7 @@ LOCAL_INCLUDES += [
'/netwerk/base', '/netwerk/base',
] ]
UNIFIED_SOURCES += [ SOURCES += [
'nsSocketProviderService.cpp', 'nsSocketProviderService.cpp',
'nsSOCKSIOLayer.cpp', 'nsSOCKSIOLayer.cpp',
'nsSOCKSSocketProvider.cpp', 'nsSOCKSSocketProvider.cpp',
@ -29,7 +29,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
XPIDL_SOURCES += [ XPIDL_SOURCES += [
'nsINamedPipeService.idl', 'nsINamedPipeService.idl',
] ]
UNIFIED_SOURCES += [ SOURCES += [
'nsNamedPipeIOLayer.cpp', 'nsNamedPipeIOLayer.cpp',
'nsNamedPipeService.cpp' 'nsNamedPipeService.cpp'
] ]

View File

@ -12,6 +12,7 @@
#include "nsError.h" #include "nsError.h"
using mozilla::NeckoOriginAttributes; using mozilla::NeckoOriginAttributes;
using namespace mozilla::net;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////

View File

@ -4,7 +4,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
UNIFIED_SOURCES += [ SOURCES += [
'crypto/cipher/aes.c', 'crypto/cipher/aes.c',
'crypto/cipher/aes_cbc.c', 'crypto/cipher/aes_cbc.c',
'crypto/cipher/aes_icm.c', 'crypto/cipher/aes_icm.c',

View File

@ -10,7 +10,7 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'necko_http' XPIDL_MODULE = 'necko_http'
UNIFIED_SOURCES += [ SOURCES += [
'mozTXTToHTMLConv.cpp', 'mozTXTToHTMLConv.cpp',
'nsDirIndex.cpp', 'nsDirIndex.cpp',
'nsDirIndexParser.cpp', 'nsDirIndexParser.cpp',
@ -22,13 +22,13 @@ UNIFIED_SOURCES += [
] ]
if 'ftp' in CONFIG['NECKO_PROTOCOLS']: if 'ftp' in CONFIG['NECKO_PROTOCOLS']:
UNIFIED_SOURCES += [ SOURCES += [
'nsFTPDirListingConv.cpp', 'nsFTPDirListingConv.cpp',
'ParseFTPList.cpp', 'ParseFTPList.cpp',
] ]
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'cocoa': if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'cocoa':
UNIFIED_SOURCES += [ SOURCES += [
'nsBinHexDecoder.cpp', 'nsBinHexDecoder.cpp',
] ]

View File

@ -15,8 +15,10 @@
#include "nsThreadUtils.h" #include "nsThreadUtils.h"
#include "mozilla/Preferences.h" #include "mozilla/Preferences.h"
#include "mozilla/Logging.h" #include "mozilla/Logging.h"
#include "mozilla/UniquePtrExtensions.h"
#include "nsIForcePendingChannel.h" #include "nsIForcePendingChannel.h"
#include "nsIRequest.h" #include "nsIRequest.h"
#include <inttypes.h>
// brotli headers // brotli headers
#include "state.h" #include "state.h"

View File

@ -12,16 +12,13 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'necko_wifi' XPIDL_MODULE = 'necko_wifi'
UNIFIED_SOURCES += [ SOURCES += [
'nsWifiAccessPoint.cpp', 'nsWifiAccessPoint.cpp',
]
UNIFIED_SOURCES += [
'nsWifiMonitor.cpp', 'nsWifiMonitor.cpp',
] ]
if CONFIG['OS_ARCH'] == 'Darwin': if CONFIG['OS_ARCH'] == 'Darwin':
UNIFIED_SOURCES += [ SOURCES += [
'nsWifiScannerMac.cpp', 'nsWifiScannerMac.cpp',
] ]
SOURCES += [ SOURCES += [
@ -32,23 +29,23 @@ if CONFIG['OS_ARCH'] == 'Darwin':
# to accept the warnings when targeting the newer SDKs. # to accept the warnings when targeting the newer SDKs.
SOURCES['osx_corewlan.mm'].flags += ['-Wno-error=objc-method-access'] SOURCES['osx_corewlan.mm'].flags += ['-Wno-error=objc-method-access']
elif CONFIG['OS_ARCH'] in ('DragonFly', 'FreeBSD'): elif CONFIG['OS_ARCH'] in ('DragonFly', 'FreeBSD'):
UNIFIED_SOURCES += [ SOURCES += [
'nsWifiScannerFreeBSD.cpp', 'nsWifiScannerFreeBSD.cpp',
] ]
elif CONFIG['OS_ARCH'] == 'WINNT': elif CONFIG['OS_ARCH'] == 'WINNT':
UNIFIED_SOURCES += [ SOURCES += [
'nsWifiScannerWin.cpp', 'nsWifiScannerWin.cpp',
'win_wifiScanner.cpp', 'win_wifiScanner.cpp',
'win_wlanLibrary.cpp', 'win_wlanLibrary.cpp',
] ]
elif CONFIG['OS_ARCH'] == 'SunOS': elif CONFIG['OS_ARCH'] == 'SunOS':
CXXFLAGS += CONFIG['GLIB_CFLAGS'] CXXFLAGS += CONFIG['GLIB_CFLAGS']
UNIFIED_SOURCES += [ SOURCES += [
'nsWifiScannerSolaris.cpp', 'nsWifiScannerSolaris.cpp',
] ]
if CONFIG['NECKO_WIFI_DBUS']: if CONFIG['NECKO_WIFI_DBUS']:
UNIFIED_SOURCES += [ SOURCES += [
'nsWifiScannerDBus.cpp', 'nsWifiScannerDBus.cpp',
] ]
CXXFLAGS += ['-Wno-error=shadow'] CXXFLAGS += ['-Wno-error=shadow']