mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 07:34:20 +00:00
Bug 1488306 - Remove the XPCOM component registration for nsUnknwonDecoder; r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D4897
This commit is contained in:
parent
abcd838ffb
commit
d7274895ea
@ -9,7 +9,7 @@
|
||||
#include "nsURLHelper.h"
|
||||
#include "nsNetCID.h"
|
||||
#include "nsMimeTypes.h"
|
||||
#include "nsIContentSniffer.h"
|
||||
#include "nsUnknownDecoder.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsMimeTypes.h"
|
||||
#include "nsIHttpChannel.h"
|
||||
@ -824,10 +824,7 @@ CallUnknownTypeSniffer(void *aClosure, const uint8_t *aData, uint32_t aCount)
|
||||
{
|
||||
nsIChannel *chan = static_cast<nsIChannel*>(aClosure);
|
||||
|
||||
nsCOMPtr<nsIContentSniffer> sniffer =
|
||||
do_CreateInstance(NS_GENERIC_CONTENT_SNIFFER);
|
||||
if (!sniffer)
|
||||
return;
|
||||
RefPtr<nsUnknownDecoder> sniffer = new nsUnknownDecoder();
|
||||
|
||||
nsAutoCString detected;
|
||||
nsresult rv = sniffer->GetMIMETypeFromContent(chan, aData, aCount, detected);
|
||||
|
@ -952,14 +952,6 @@
|
||||
{0xa1, 0x6c, 0x00, 0x50, 0x04, 0x1c, 0xaf, 0x44} \
|
||||
}
|
||||
|
||||
/**
|
||||
* General-purpose content sniffer component. Use with CreateInstance.
|
||||
*
|
||||
* Implements nsIContentSniffer
|
||||
*/
|
||||
#define NS_GENERIC_CONTENT_SNIFFER \
|
||||
"@mozilla.org/network/content-sniffer;1"
|
||||
|
||||
/**
|
||||
* Detector that can act as either an nsIStreamConverter or an
|
||||
* nsIContentSniffer to decide whether text/plain data is "really" text/plain
|
||||
|
@ -948,7 +948,6 @@ static const mozilla::Module::ContractIDEntry kNeckoContracts[] = {
|
||||
{ NS_ISTREAMCONVERTER_KEY MULTI_BYTERANGES, &kNS_MULTIMIXEDCONVERTER_CID },
|
||||
{ NS_ISTREAMCONVERTER_KEY MULTI_MIXED, &kNS_MULTIMIXEDCONVERTER_CID },
|
||||
{ NS_ISTREAMCONVERTER_KEY UNKNOWN_CONTENT, &kNS_UNKNOWNDECODER_CID },
|
||||
{ NS_GENERIC_CONTENT_SNIFFER, &kNS_UNKNOWNDECODER_CID },
|
||||
{ NS_BINARYDETECTOR_CONTRACTID, &kNS_BINARYDETECTOR_CID },
|
||||
{ NS_ISTREAMCONVERTER_KEY GZIP_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID },
|
||||
{ NS_ISTREAMCONVERTER_KEY XGZIP_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID },
|
||||
|
@ -8,6 +8,10 @@ XPIDL_SOURCES += [
|
||||
'nsICompressConvStats.idl'
|
||||
]
|
||||
|
||||
EXPORTS += [
|
||||
'nsUnknownDecoder.h',
|
||||
]
|
||||
|
||||
XPIDL_MODULE = 'necko_http'
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
|
Loading…
x
Reference in New Issue
Block a user