зеркало из https://github.com/mozilla/gecko-dev.git
Bug 919292 - Minimize the #includes in netwerk/streamconv; r=mcmanus
This commit is contained in:
Родитель
e8c48e7df8
Коммит
123240353c
|
@ -3,13 +3,13 @@
|
|||
* 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/. */
|
||||
|
||||
#include "ParseFTPList.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include "plstr.h"
|
||||
#include "nsDebug.h"
|
||||
|
||||
#include "ParseFTPList.h"
|
||||
#include "prprf.h"
|
||||
|
||||
/* ==================================================================== */
|
||||
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
/* 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/. */
|
||||
#include "nspr.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include "prtime.h"
|
||||
|
||||
/* ParseFTPList() parses lines from an FTP LIST command.
|
||||
**
|
||||
|
|
|
@ -4,13 +4,11 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "mozTXTToHTMLConv.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsNetCID.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsIExternalProtocolHandler.h"
|
||||
#include "nsIIOService.h"
|
||||
|
||||
#ifdef DEBUG_BenB_Perf
|
||||
#include "prtime.h"
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
#define _mozTXTToHTMLConv_h__
|
||||
|
||||
#include "mozITXTToHTMLConv.h"
|
||||
#include "nsIIOService.h"
|
||||
#include "nsString.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
class nsIIOService;
|
||||
|
||||
class mozTXTToHTMLConv : public mozITXTToHTMLConv
|
||||
{
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsDirIndex.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsISupportsObsolete.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsDirIndex,
|
||||
|
|
|
@ -10,17 +10,15 @@
|
|||
#include "prprf.h"
|
||||
|
||||
#include "nsDirIndexParser.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsDirIndex.h"
|
||||
#include "nsEscape.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsIPrefService.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsIPrefLocalizedString.h"
|
||||
#include "nsITextToSubURI.h"
|
||||
#include "nsIDirIndex.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
|
|
|
@ -6,11 +6,12 @@
|
|||
#ifndef __NSDIRINDEX_H_
|
||||
#define __NSDIRINDEX_H_
|
||||
|
||||
#include "nsIDirIndex.h"
|
||||
#include "nsString.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIDirIndexListener.h"
|
||||
#include "nsITextToSubURI.h"
|
||||
|
||||
class nsIDirIndex;
|
||||
class nsITextToSubURI;
|
||||
|
||||
/* CID: {a0d6ad32-1dd1-11b2-aa55-a40187b54036} */
|
||||
|
||||
|
|
|
@ -7,19 +7,13 @@
|
|||
#include "nsMemory.h"
|
||||
#include "plstr.h"
|
||||
#include "prlog.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsEscape.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsStringStream.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsDateTimeFormatCID.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsMimeTypes.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsIChannel.h"
|
||||
|
||||
#include "ParseFTPList.h"
|
||||
#include <algorithm>
|
||||
|
|
|
@ -6,11 +6,9 @@
|
|||
#define __nsftpdirlistingdconv__h__
|
||||
|
||||
#include "nsIStreamConverter.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsString.h"
|
||||
|
||||
#include "nsIFactory.h"
|
||||
class nsIURI;
|
||||
|
||||
#define NS_FTPDIRLISTINGCONVERTER_CID \
|
||||
{ /* 14C0E880-623E-11d3-A178-0050041CAF44 */ \
|
||||
|
|
|
@ -7,10 +7,7 @@
|
|||
#include "nsHTTPCompressConv.h"
|
||||
#include "nsMemory.h"
|
||||
#include "plstr.h"
|
||||
#include "prlog.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsError.h"
|
||||
#include "nsStreamUtils.h"
|
||||
#include "nsStringStream.h"
|
||||
|
|
|
@ -7,11 +7,12 @@
|
|||
#define __nsHTTPCompressConv__h__ 1
|
||||
|
||||
#include "nsIStreamConverter.h"
|
||||
#include "nsIStringStream.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
#include "zlib.h"
|
||||
|
||||
class nsIStringInputStream;
|
||||
|
||||
#define NS_HTTPCOMPRESSCONVERTER_CID \
|
||||
{ \
|
||||
/* 66230b2b-17fa-4bd3-abf4-07986151022d */ \
|
||||
|
|
|
@ -10,15 +10,18 @@
|
|||
#include "nsIFileURL.h"
|
||||
#include "nsEscape.h"
|
||||
#include "nsIDirIndex.h"
|
||||
#include "prtime.h"
|
||||
#include "nsDateTimeFormatCID.h"
|
||||
#include "nsURLHelper.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsIPlatformCharset.h"
|
||||
#include "nsIPrefService.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsIPrefLocalizedString.h"
|
||||
#include "nsIChromeRegistry.h"
|
||||
#include "nsICharsetConverterManager.h"
|
||||
#include "nsIDateTimeFormat.h"
|
||||
#include "nsIStringBundle.h"
|
||||
#include "nsITextToSubURI.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include <algorithm>
|
||||
|
||||
NS_IMPL_ISUPPORTS4(nsIndexedToHTML,
|
||||
|
|
|
@ -7,20 +7,17 @@
|
|||
#define ____nsindexedtohtml___h___
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIFactory.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIStreamConverter.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsIDirIndexListener.h"
|
||||
#include "nsIDateTimeFormat.h"
|
||||
#include "nsIStringBundle.h"
|
||||
#include "nsIStringStream.h"
|
||||
#include "nsITextToSubURI.h"
|
||||
#include "nsICharsetConverterManager.h"
|
||||
|
||||
#define NS_NSINDEXEDTOHTMLCONVERTER_CID \
|
||||
{ 0xcf0f71fd, 0xfafd, 0x4e2b, {0x9f, 0xdc, 0x13, 0x4d, 0x97, 0x2e, 0x16, 0xe2} }
|
||||
|
||||
class nsIDateTimeFormat;
|
||||
class nsIStringBundle;
|
||||
class nsITextToSubURI;
|
||||
class nsIUnicodeEncoder;
|
||||
|
||||
class nsIndexedToHTML : public nsIStreamConverter,
|
||||
public nsIDirIndexListener
|
||||
|
|
|
@ -4,14 +4,11 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsMultiMixedConv.h"
|
||||
#include "nsMemory.h"
|
||||
#include "plstr.h"
|
||||
#include "nsIHttpChannel.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsMimeTypes.h"
|
||||
#include "nsIStringStream.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsIHttpChannelInternal.h"
|
||||
#include "nsURLHelper.h"
|
||||
|
|
|
@ -7,9 +7,7 @@
|
|||
|
||||
#include "nsIStreamConverter.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsString.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIByteRangeRequest.h"
|
||||
#include "nsIMultiPartChannel.h"
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsTXTToHTMLConv.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsEscape.h"
|
||||
#include "nsStringStream.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsIChannel.h"
|
||||
#include <algorithm>
|
||||
|
||||
#define TOKEN_DELIMITERS NS_LITERAL_STRING("\t\r\n ").get()
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
#include "nsITXTToHTMLConv.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsIFactory.h"
|
||||
#include "nsString.h"
|
||||
|
||||
#define NS_NSTXTTOHTMLCONVERTER_CID \
|
||||
|
@ -27,7 +25,9 @@ typedef struct convToken {
|
|||
nsString modText; // replacement text or href prepend text.
|
||||
bool prepend; // flag indicating how the modText should be used.
|
||||
} convToken;
|
||||
|
||||
|
||||
template<class T> class nsAutoPtr;
|
||||
|
||||
/**
|
||||
* Convert plain text to HTML.
|
||||
*
|
||||
|
|
|
@ -4,19 +4,12 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsUnknownDecoder.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIStreamConverterService.h"
|
||||
|
||||
#include "nsIPipe.h"
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsIOutputStream.h"
|
||||
#include "nsMimeTypes.h"
|
||||
#include "netCore.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsIPrefService.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsICategoryManager.h"
|
||||
#include "nsISupportsPrimitives.h"
|
||||
|
||||
#include "nsCRT.h"
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#define nsUnknownDecoder_h__
|
||||
|
||||
#include "nsIStreamConverter.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsIContentSniffer.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
|
|
|
@ -19,20 +19,47 @@
|
|||
*/
|
||||
|
||||
#include "nsStreamConverterService.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIComponentRegistrar.h"
|
||||
#include "nsString.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsDeque.h"
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsIOutputStream.h"
|
||||
#include "nsIStreamConverter.h"
|
||||
#include "nsICategoryManager.h"
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsISupportsPrimitives.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsCOMArray.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsHashtable.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// Breadth-First-Search (BFS) algorithm state classes and types.
|
||||
|
||||
// used to establish discovered vertecies.
|
||||
enum BFScolors {white, gray, black};
|
||||
|
||||
struct BFSState {
|
||||
BFScolors color;
|
||||
int32_t distance;
|
||||
nsCStringKey *predecessor;
|
||||
~BFSState() {
|
||||
delete predecessor;
|
||||
}
|
||||
};
|
||||
|
||||
// adjacency list and BFS hashtable data class.
|
||||
struct SCTableData {
|
||||
nsCStringKey *key;
|
||||
union _data {
|
||||
BFSState *state;
|
||||
nsCOMArray<nsIAtom> *edges;
|
||||
} data;
|
||||
|
||||
SCTableData(nsCStringKey* aKey) : key(aKey) {
|
||||
data.state = nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// nsISupports methods
|
||||
|
|
|
@ -7,11 +7,10 @@
|
|||
#define __nsstreamconverterservice__h___
|
||||
|
||||
#include "nsIStreamConverterService.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsHashtable.h"
|
||||
#include "nsCOMArray.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsIAtom.h"
|
||||
|
||||
template<class T> class nsTArray;
|
||||
class nsObjectHashtable;
|
||||
class nsCString;
|
||||
|
||||
class nsStreamConverterService : public nsIStreamConverterService {
|
||||
public:
|
||||
|
@ -43,31 +42,4 @@ private:
|
|||
nsObjectHashtable *mAdjacencyList;
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// Breadth-First-Search (BFS) algorithm state classes and types.
|
||||
|
||||
// used to establish discovered vertecies.
|
||||
enum BFScolors {white, gray, black};
|
||||
|
||||
struct BFSState {
|
||||
BFScolors color;
|
||||
int32_t distance;
|
||||
nsCStringKey *predecessor;
|
||||
~BFSState() {
|
||||
delete predecessor;
|
||||
}
|
||||
};
|
||||
|
||||
// adjacency list and BFS hashtable data class.
|
||||
struct SCTableData {
|
||||
nsCStringKey *key;
|
||||
union _data {
|
||||
BFSState *state;
|
||||
nsCOMArray<nsIAtom> *edges;
|
||||
} data;
|
||||
|
||||
SCTableData(nsCStringKey* aKey) : key(aKey) {
|
||||
data.state = nullptr;
|
||||
}
|
||||
};
|
||||
#endif // __nsstreamconverterservice__h___
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIComponentRegistrar.h"
|
||||
#include "nsIStreamConverterService.h"
|
||||
#include "nsIStreamConverter.h"
|
||||
#include "nsICategoryManager.h"
|
||||
|
@ -13,11 +11,14 @@
|
|||
#include "nsXULAppAPI.h"
|
||||
#include "nsIStringStream.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsMemory.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsIRequest.h"
|
||||
#include "nsNetCID.h"
|
||||
|
||||
#include "nspr.h"
|
||||
#include <algorithm>
|
||||
|
||||
#define ASYNC_TEST // undefine this if you want to test sycnronous conversion.
|
||||
|
|
Загрузка…
Ссылка в новой задаче