зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1067471 - Add newChannel2 to nsIProtocolHandler that takes a loadinfo as an argument (r=sicking)
This commit is contained in:
Родитель
5dca9bcabc
Коммит
33a07fa544
|
@ -99,8 +99,9 @@ nsChromeProtocolHandler::NewURI(const nsACString &aSpec,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsChromeProtocolHandler::NewChannel(nsIURI* aURI,
|
||||
nsIChannel* *aResult)
|
||||
nsChromeProtocolHandler::NewChannel2(nsIURI* aURI,
|
||||
nsILoadInfo* aLoadinfo,
|
||||
nsIChannel** aResult)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
|
@ -207,4 +208,11 @@ nsChromeProtocolHandler::NewChannel(nsIURI* aURI,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsChromeProtocolHandler::NewChannel(nsIURI* aURI,
|
||||
nsIChannel* *aResult)
|
||||
{
|
||||
return NewChannel2(aURI, nullptr, aResult);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -39,6 +39,7 @@ public:
|
|||
NS_IMETHOD GetDefaultPort(int32_t *aDefaultPort) MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetProtocolFlags(uint32_t *aProtocolFlags) MOZ_OVERRIDE;
|
||||
NS_IMETHOD NewURI(const nsACString & aSpec, const char * aOriginCharset, nsIURI *aBaseURI, nsIURI * *_retval) MOZ_OVERRIDE;
|
||||
NS_IMETHOD NewChannel2(nsIURI *aURI, nsILoadInfo *aLoadinfo, nsIChannel * *_retval) MOZ_OVERRIDE;
|
||||
NS_IMETHOD NewChannel(nsIURI *aURI, nsIChannel * *_retval) MOZ_OVERRIDE;
|
||||
NS_IMETHOD AllowPort(int32_t port, const char * scheme, bool *_retval) MOZ_OVERRIDE;
|
||||
|
||||
|
|
|
@ -484,7 +484,9 @@ nsHostObjectProtocolHandler::NewURI(const nsACString& aSpec,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHostObjectProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
||||
nsHostObjectProtocolHandler::NewChannel2(nsIURI* uri,
|
||||
nsILoadInfo *aLoadinfo,
|
||||
nsIChannel** result)
|
||||
{
|
||||
*result = nullptr;
|
||||
|
||||
|
@ -550,6 +552,12 @@ nsHostObjectProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHostObjectProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
||||
{
|
||||
return NewChannel2(uri, nullptr, result);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHostObjectProtocolHandler::AllowPort(int32_t port, const char *scheme,
|
||||
bool *_retval)
|
||||
|
|
|
@ -1207,7 +1207,9 @@ nsJSProtocolHandler::NewURI(const nsACString &aSpec,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsJSProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
||||
nsJSProtocolHandler::NewChannel2(nsIURI* uri,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** result)
|
||||
{
|
||||
nsresult rv;
|
||||
nsJSChannel * channel;
|
||||
|
@ -1229,6 +1231,12 @@ nsJSProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsJSProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
||||
{
|
||||
return NewChannel2(uri, nullptr, result);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsJSProtocolHandler::AllowPort(int32_t port, const char *scheme, bool *_retval)
|
||||
{
|
||||
|
|
|
@ -1046,7 +1046,9 @@ nsGIOProtocolHandler::NewURI(const nsACString &aSpec,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGIOProtocolHandler::NewChannel(nsIURI *aURI, nsIChannel **aResult)
|
||||
nsGIOProtocolHandler::NewChannel2(nsIURI* aURI,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** aResult)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aURI);
|
||||
nsresult rv;
|
||||
|
@ -1082,6 +1084,12 @@ nsGIOProtocolHandler::NewChannel(nsIURI *aURI, nsIChannel **aResult)
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGIOProtocolHandler::NewChannel(nsIURI *aURI, nsIChannel **aResult)
|
||||
{
|
||||
return NewChannel2(aURI, nullptr, aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGIOProtocolHandler::AllowPort(int32_t aPort,
|
||||
const char *aScheme,
|
||||
|
|
|
@ -899,7 +899,9 @@ nsGnomeVFSProtocolHandler::NewURI(const nsACString &aSpec,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGnomeVFSProtocolHandler::NewChannel(nsIURI *aURI, nsIChannel **aResult)
|
||||
nsGnomeVFSProtocolHandler::NewChannel2(nsIURI* aURI,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** aResult)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aURI);
|
||||
nsresult rv;
|
||||
|
@ -926,6 +928,12 @@ nsGnomeVFSProtocolHandler::NewChannel(nsIURI *aURI, nsIChannel **aResult)
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGnomeVFSProtocolHandler::NewChannel(nsIURI *aURI, nsIChannel **aResult)
|
||||
{
|
||||
return NewChannel2(aURI, nullptr, aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGnomeVFSProtocolHandler::AllowPort(int32_t aPort,
|
||||
const char *aScheme,
|
||||
|
|
|
@ -71,7 +71,10 @@ NS_IMETHODIMP nsIconProtocolHandler::NewURI(const nsACString &aSpec,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsIconProtocolHandler::NewChannel(nsIURI* url, nsIChannel* *result)
|
||||
NS_IMETHODIMP
|
||||
nsIconProtocolHandler::NewChannel2(nsIURI* url,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** result)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(url);
|
||||
nsIconChannel* channel = new nsIconChannel;
|
||||
|
@ -89,4 +92,9 @@ NS_IMETHODIMP nsIconProtocolHandler::NewChannel(nsIURI* url, nsIChannel* *result
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsIconProtocolHandler::NewChannel(nsIURI* url, nsIChannel* *result)
|
||||
{
|
||||
return NewChannel2(url, nullptr, result);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -208,7 +208,9 @@ nsJARProtocolHandler::NewURI(const nsACString &aSpec,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsJARProtocolHandler::NewChannel(nsIURI *uri, nsIChannel **result)
|
||||
nsJARProtocolHandler::NewChannel2(nsIURI* uri,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** result)
|
||||
{
|
||||
nsJARChannel *chan = new nsJARChannel();
|
||||
if (!chan)
|
||||
|
@ -225,6 +227,12 @@ nsJARProtocolHandler::NewChannel(nsIURI *uri, nsIChannel **result)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsJARProtocolHandler::NewChannel(nsIURI *uri, nsIChannel **result)
|
||||
{
|
||||
return NewChannel2(uri, nullptr, result);
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsJARProtocolHandler::AllowPort(int32_t port, const char *scheme, bool *_retval)
|
||||
|
|
|
@ -7,11 +7,12 @@
|
|||
|
||||
interface nsIURI;
|
||||
interface nsIChannel;
|
||||
interface nsILoadInfo;
|
||||
|
||||
/**
|
||||
* nsIProtocolHandler
|
||||
*/
|
||||
[scriptable, uuid(f5753fec-a051-4ddc-8891-11f1f1575072)]
|
||||
[scriptable, uuid(a7aad716-e72c-435d-82f1-7582dffae661)]
|
||||
interface nsIProtocolHandler : nsISupports
|
||||
{
|
||||
/**
|
||||
|
@ -61,7 +62,13 @@ interface nsIProtocolHandler : nsISupports
|
|||
in nsIURI aBaseURI);
|
||||
|
||||
/**
|
||||
* Constructs a new channel from the given URI for this protocol handler.
|
||||
* Constructs a new channel from the given URI for this protocol handler and
|
||||
* sets the loadInfo for the constructed channel.
|
||||
*/
|
||||
nsIChannel newChannel2(in nsIURI aURI, in nsILoadInfo aLoadinfo);
|
||||
|
||||
/**
|
||||
* Constructs a new channel from the given URI for this protocol handler.
|
||||
*/
|
||||
nsIChannel newChannel(in nsIURI aURI);
|
||||
|
||||
|
|
|
@ -8,10 +8,31 @@
|
|||
interface nsIChannel;
|
||||
interface nsIURI;
|
||||
interface nsIProxyInfo;
|
||||
interface nsILoadInfo;
|
||||
|
||||
[scriptable, uuid(2b63fe69-b0fc-48f2-a2df-adb795a4ce5c)]
|
||||
[scriptable, uuid(3756047a-fa2b-4b45-9948-3b5f8fc375e7)]
|
||||
interface nsIProxiedProtocolHandler : nsIProtocolHandler
|
||||
{
|
||||
/** Create a new channel with the given proxyInfo
|
||||
*
|
||||
* @param uri the channel uri
|
||||
* @param proxyInfo any proxy information that has already been determined,
|
||||
* or null if channel should later determine the proxy on its own using
|
||||
* proxyResolveFlags/proxyURI
|
||||
* @param proxyResolveFlags used if the proxy is later determined
|
||||
* from nsIProtocolProxyService::asyncResolve
|
||||
* @param proxyURI used if the proxy is later determined from
|
||||
* nsIProtocolProxyService::asyncResolve with this as the proxyURI name.
|
||||
* Generally this is the same as uri (or null which has the same
|
||||
* effect), except in the case of websockets which wants to bootstrap
|
||||
* to an http:// channel but make its proxy determination based on
|
||||
* a ws:// uri.
|
||||
*/
|
||||
nsIChannel newProxiedChannel2(in nsIURI uri, in nsIProxyInfo proxyInfo,
|
||||
in unsigned long proxyResolveFlags,
|
||||
in nsIURI proxyURI,
|
||||
in nsILoadInfo aLoadInfo);
|
||||
|
||||
/** Create a new channel with the given proxyInfo
|
||||
*
|
||||
* @param uri the channel uri
|
||||
|
@ -31,4 +52,3 @@ interface nsIProxiedProtocolHandler : nsIProtocolHandler
|
|||
in unsigned long proxyResolveFlags,
|
||||
in nsIURI proxyURI);
|
||||
};
|
||||
|
||||
|
|
|
@ -118,7 +118,9 @@ nsAboutProtocolHandler::NewURI(const nsACString &aSpec,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAboutProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
||||
nsAboutProtocolHandler::NewChannel2(nsIURI* uri,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** result)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(uri);
|
||||
|
||||
|
@ -176,6 +178,12 @@ nsAboutProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAboutProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
||||
{
|
||||
return NewChannel2(uri, nullptr, result);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAboutProtocolHandler::AllowPort(int32_t port, const char *scheme, bool *_retval)
|
||||
{
|
||||
|
@ -235,6 +243,15 @@ nsSafeAboutProtocolHandler::NewURI(const nsACString &aSpec,
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSafeAboutProtocolHandler::NewChannel2(nsIURI* uri,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** result)
|
||||
{
|
||||
*result = nullptr;
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSafeAboutProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
||||
{
|
||||
|
|
|
@ -375,10 +375,10 @@ AppProtocolHandler::NewURI(const nsACString &aSpec,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
// We map app://ABCDEF/path/to/file.ext to
|
||||
// jar:file:///path/to/profile/webapps/ABCDEF/application.zip!/path/to/file.ext
|
||||
NS_IMETHODIMP
|
||||
AppProtocolHandler::NewChannel(nsIURI* aUri, nsIChannel* *aResult)
|
||||
AppProtocolHandler::NewChannel2(nsIURI* aUri,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** aResult)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aUri);
|
||||
nsRefPtr<nsJARChannel> channel = new nsJARChannel();
|
||||
|
@ -466,6 +466,14 @@ AppProtocolHandler::NewChannel(nsIURI* aUri, nsIChannel* *aResult)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
// We map app://ABCDEF/path/to/file.ext to
|
||||
// jar:file:///path/to/profile/webapps/ABCDEF/application.zip!/path/to/file.ext
|
||||
NS_IMETHODIMP
|
||||
AppProtocolHandler::NewChannel(nsIURI* aUri, nsIChannel* *aResult)
|
||||
{
|
||||
return NewChannel2(aUri, nullptr, aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
AppProtocolHandler::AllowPort(int32_t aPort, const char *aScheme, bool *aRetval)
|
||||
{
|
||||
|
|
|
@ -103,7 +103,10 @@ nsDataHandler::NewURI(const nsACString &aSpec,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDataHandler::NewChannel(nsIURI* uri, nsIChannel* *result) {
|
||||
nsDataHandler::NewChannel2(nsIURI* uri,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** result)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(uri);
|
||||
nsDataChannel* channel = new nsDataChannel(uri);
|
||||
if (!channel)
|
||||
|
@ -120,6 +123,12 @@ nsDataHandler::NewChannel(nsIURI* uri, nsIChannel* *result) {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDataHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
||||
{
|
||||
return NewChannel2(uri, nullptr, result);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDataHandler::AllowPort(int32_t port, const char *scheme, bool *_retval) {
|
||||
// don't override anything.
|
||||
|
|
|
@ -54,7 +54,9 @@ nsDeviceProtocolHandler::NewURI(const nsACString &spec,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDeviceProtocolHandler::NewChannel(nsIURI* aURI, nsIChannel **aResult)
|
||||
nsDeviceProtocolHandler::NewChannel2(nsIURI* aURI,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** aResult)
|
||||
{
|
||||
nsRefPtr<nsDeviceChannel> channel = new nsDeviceChannel();
|
||||
nsresult rv = channel->Init(aURI);
|
||||
|
@ -63,6 +65,12 @@ nsDeviceProtocolHandler::NewChannel(nsIURI* aURI, nsIChannel **aResult)
|
|||
return CallQueryInterface(channel, aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDeviceProtocolHandler::NewChannel(nsIURI* aURI, nsIChannel **aResult)
|
||||
{
|
||||
return NewChannel2(aURI, nullptr, aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDeviceProtocolHandler::AllowPort(int32_t port,
|
||||
const char *scheme,
|
||||
|
|
|
@ -177,7 +177,9 @@ nsFileProtocolHandler::NewURI(const nsACString &spec,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileProtocolHandler::NewChannel(nsIURI *uri, nsIChannel **result)
|
||||
nsFileProtocolHandler::NewChannel2(nsIURI* uri,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** result)
|
||||
{
|
||||
nsFileChannel *chan = new nsFileChannel(uri);
|
||||
if (!chan)
|
||||
|
@ -194,6 +196,12 @@ nsFileProtocolHandler::NewChannel(nsIURI *uri, nsIChannel **result)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileProtocolHandler::NewChannel(nsIURI *uri, nsIChannel **result)
|
||||
{
|
||||
return NewChannel2(uri, nullptr, result);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileProtocolHandler::AllowPort(int32_t port, const char *scheme, bool *result)
|
||||
{
|
||||
|
|
|
@ -203,16 +203,25 @@ nsFtpProtocolHandler::NewURI(const nsACString &aSpec,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFtpProtocolHandler::NewChannel(nsIURI* url, nsIChannel* *result)
|
||||
nsFtpProtocolHandler::NewChannel2(nsIURI* url,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** result)
|
||||
{
|
||||
return NewProxiedChannel(url, nullptr, 0, nullptr, result);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFtpProtocolHandler::NewProxiedChannel(nsIURI* uri, nsIProxyInfo* proxyInfo,
|
||||
uint32_t proxyResolveFlags,
|
||||
nsIURI *proxyURI,
|
||||
nsIChannel* *result)
|
||||
nsFtpProtocolHandler::NewChannel(nsIURI* url, nsIChannel* *result)
|
||||
{
|
||||
return NewChannel2(url, nullptr, result);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFtpProtocolHandler::NewProxiedChannel2(nsIURI* uri, nsIProxyInfo* proxyInfo,
|
||||
uint32_t proxyResolveFlags,
|
||||
nsIURI *proxyURI,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel* *result)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(uri);
|
||||
nsRefPtr<nsBaseChannel> channel;
|
||||
|
@ -230,6 +239,17 @@ nsFtpProtocolHandler::NewProxiedChannel(nsIURI* uri, nsIProxyInfo* proxyInfo,
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFtpProtocolHandler::NewProxiedChannel(nsIURI* uri, nsIProxyInfo* proxyInfo,
|
||||
uint32_t proxyResolveFlags,
|
||||
nsIURI *proxyURI,
|
||||
nsIChannel* *result)
|
||||
{
|
||||
return NewProxiedChannel2(uri, proxyInfo, proxyResolveFlags,
|
||||
proxyURI, nullptr /*loadinfo*/,
|
||||
result);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFtpProtocolHandler::AllowPort(int32_t port, const char *scheme, bool *_retval)
|
||||
{
|
||||
|
|
|
@ -1680,7 +1680,9 @@ nsHttpHandler::NewURI(const nsACString &aSpec,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHttpHandler::NewChannel(nsIURI *uri, nsIChannel **result)
|
||||
nsHttpHandler::NewChannel2(nsIURI* uri,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** result)
|
||||
{
|
||||
LOG(("nsHttpHandler::NewChannel\n"));
|
||||
|
||||
|
@ -1704,6 +1706,12 @@ nsHttpHandler::NewChannel(nsIURI *uri, nsIChannel **result)
|
|||
return NewProxiedChannel(uri, nullptr, 0, nullptr, result);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHttpHandler::NewChannel(nsIURI *uri, nsIChannel **result)
|
||||
{
|
||||
return NewChannel2(uri, nullptr, result);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHttpHandler::AllowPort(int32_t port, const char *scheme, bool *_retval)
|
||||
{
|
||||
|
@ -1717,11 +1725,12 @@ nsHttpHandler::AllowPort(int32_t port, const char *scheme, bool *_retval)
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHttpHandler::NewProxiedChannel(nsIURI *uri,
|
||||
nsIProxyInfo* givenProxyInfo,
|
||||
uint32_t proxyResolveFlags,
|
||||
nsIURI *proxyURI,
|
||||
nsIChannel **result)
|
||||
nsHttpHandler::NewProxiedChannel2(nsIURI *uri,
|
||||
nsIProxyInfo* givenProxyInfo,
|
||||
uint32_t proxyResolveFlags,
|
||||
nsIURI *proxyURI,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** result)
|
||||
{
|
||||
nsRefPtr<HttpBaseChannel> httpChannel;
|
||||
|
||||
|
@ -1766,6 +1775,18 @@ nsHttpHandler::NewProxiedChannel(nsIURI *uri,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHttpHandler::NewProxiedChannel(nsIURI *uri,
|
||||
nsIProxyInfo* givenProxyInfo,
|
||||
uint32_t proxyResolveFlags,
|
||||
nsIURI *proxyURI,
|
||||
nsIChannel **result)
|
||||
{
|
||||
return NewProxiedChannel2(uri, givenProxyInfo,
|
||||
proxyResolveFlags, proxyURI,
|
||||
nullptr, result);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// nsHttpHandler::nsIHttpProtocolHandler
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -2057,7 +2078,9 @@ nsHttpsHandler::NewURI(const nsACString &aSpec,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHttpsHandler::NewChannel(nsIURI *aURI, nsIChannel **_retval)
|
||||
nsHttpsHandler::NewChannel2(nsIURI* aURI,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** _retval)
|
||||
{
|
||||
MOZ_ASSERT(gHttpHandler);
|
||||
if (!gHttpHandler)
|
||||
|
@ -2065,6 +2088,12 @@ nsHttpsHandler::NewChannel(nsIURI *aURI, nsIChannel **_retval)
|
|||
return gHttpHandler->NewChannel(aURI, _retval);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHttpsHandler::NewChannel(nsIURI *aURI, nsIChannel **_retval)
|
||||
{
|
||||
return NewChannel2(aURI, nullptr, _retval);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHttpsHandler::AllowPort(int32_t aPort, const char *aScheme, bool *_retval)
|
||||
{
|
||||
|
|
|
@ -279,7 +279,9 @@ nsResProtocolHandler::NewURI(const nsACString &aSpec,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsResProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
||||
nsResProtocolHandler::NewChannel2(nsIURI* uri,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** result)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(uri);
|
||||
nsresult rv;
|
||||
|
@ -297,6 +299,12 @@ nsResProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
|||
return (*result)->SetOriginalURI(uri);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsResProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
||||
{
|
||||
return NewChannel2(uri, nullptr, result);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsResProtocolHandler::AllowPort(int32_t port, const char *scheme, bool *_retval)
|
||||
{
|
||||
|
|
|
@ -66,7 +66,9 @@ RtspHandler::NewURI(const nsACString & aSpec,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
RtspHandler::NewChannel(nsIURI *aURI, nsIChannel **aResult)
|
||||
RtspHandler::NewChannel2(nsIURI* aURI,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** aResult)
|
||||
{
|
||||
bool isRtsp = false;
|
||||
nsRefPtr<nsBaseChannel> rtspChannel;
|
||||
|
@ -88,6 +90,12 @@ RtspHandler::NewChannel(nsIURI *aURI, nsIChannel **aResult)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
RtspHandler::NewChannel(nsIURI *aURI, nsIChannel **aResult)
|
||||
{
|
||||
return NewChannel2(aURI, nullptr, aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
RtspHandler::AllowPort(int32_t port, const char *scheme, bool *aResult)
|
||||
{
|
||||
|
|
|
@ -90,7 +90,9 @@ nsViewSourceHandler::NewURI(const nsACString &aSpec,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsViewSourceHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
||||
nsViewSourceHandler::NewChannel2(nsIURI* uri,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** result)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(uri);
|
||||
nsViewSourceChannel *channel = new nsViewSourceChannel();
|
||||
|
@ -108,6 +110,12 @@ nsViewSourceHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsViewSourceHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
||||
{
|
||||
return NewChannel2(uri, nullptr, result);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsViewSourceHandler::NewSrcdocChannel(nsIURI* uri, const nsAString &srcdoc,
|
||||
nsIURI* baseURI, nsIChannel* *result)
|
||||
|
|
|
@ -240,6 +240,15 @@ BaseWebSocketChannel::NewURI(const nsACString & aSpec, const char *aOriginCharse
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
BaseWebSocketChannel::NewChannel2(nsIURI* aURI,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** outChannel)
|
||||
{
|
||||
LOG(("BaseWebSocketChannel::NewChannel2() %p\n", this));
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
BaseWebSocketChannel::NewChannel(nsIURI *aURI, nsIChannel **_retval)
|
||||
{
|
||||
|
|
|
@ -85,7 +85,9 @@ nsWyciwygProtocolHandler::NewURI(const nsACString &aSpec,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWyciwygProtocolHandler::NewChannel(nsIURI* url, nsIChannel* *result)
|
||||
nsWyciwygProtocolHandler::NewChannel2(nsIURI* url,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** result)
|
||||
{
|
||||
if (mozilla::net::IsNeckoChild())
|
||||
mozilla::net::NeckoChild::InitNeckoChild();
|
||||
|
@ -133,6 +135,12 @@ nsWyciwygProtocolHandler::NewChannel(nsIURI* url, nsIChannel* *result)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWyciwygProtocolHandler::NewChannel(nsIURI* url, nsIChannel* *result)
|
||||
{
|
||||
return NewChannel2(url, nullptr, result);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWyciwygProtocolHandler::GetProtocolFlags(uint32_t *result)
|
||||
{
|
||||
|
|
|
@ -263,7 +263,9 @@ nsAnnoProtocolHandler::NewURI(const nsACString& aSpec,
|
|||
//
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAnnoProtocolHandler::NewChannel(nsIURI *aURI, nsIChannel **_retval)
|
||||
nsAnnoProtocolHandler::NewChannel2(nsIURI* aURI,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** _retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aURI);
|
||||
|
||||
|
@ -280,6 +282,12 @@ nsAnnoProtocolHandler::NewChannel(nsIURI *aURI, nsIChannel **_retval)
|
|||
return NewFaviconChannel(aURI, annoURI, _retval);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAnnoProtocolHandler::NewChannel(nsIURI *aURI, nsIChannel **_retval)
|
||||
{
|
||||
return NewChannel2(aURI, nullptr, _retval);
|
||||
}
|
||||
|
||||
|
||||
// nsAnnoProtocolHandler::AllowPort
|
||||
//
|
||||
|
|
|
@ -395,7 +395,10 @@ NS_IMETHODIMP nsExternalProtocolHandler::NewURI(const nsACString &aSpec,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsExternalProtocolHandler::NewChannel(nsIURI *aURI, nsIChannel **_retval)
|
||||
NS_IMETHODIMP
|
||||
nsExternalProtocolHandler::NewChannel2(nsIURI* aURI,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** _retval)
|
||||
{
|
||||
// Only try to return a channel if we have a protocol handler for the url.
|
||||
// nsOSHelperAppService::LoadUriInternal relies on this to check trustedness
|
||||
|
@ -421,6 +424,11 @@ NS_IMETHODIMP nsExternalProtocolHandler::NewChannel(nsIURI *aURI, nsIChannel **_
|
|||
return NS_ERROR_UNKNOWN_PROTOCOL;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsExternalProtocolHandler::NewChannel(nsIURI *aURI, nsIChannel **_retval)
|
||||
{
|
||||
return NewChannel2(aURI, nullptr, _retval);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
// External protocol handler interface implementation
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -163,8 +163,9 @@ nsAndroidProtocolHandler::NewURI(const nsACString &aSpec,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAndroidProtocolHandler::NewChannel(nsIURI* aURI,
|
||||
nsIChannel* *aResult)
|
||||
nsAndroidProtocolHandler::NewChannel2(nsIURI* aURI,
|
||||
nsILoadInfo* aLoadInfo,
|
||||
nsIChannel** aResult)
|
||||
{
|
||||
nsCOMPtr<nsIChannel> channel = AndroidChannel::CreateChannel(aURI);
|
||||
if (!channel)
|
||||
|
@ -172,3 +173,10 @@ nsAndroidProtocolHandler::NewChannel(nsIURI* aURI,
|
|||
NS_ADDREF(*aResult = channel);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAndroidProtocolHandler::NewChannel(nsIURI* aURI,
|
||||
nsIChannel* *aResult)
|
||||
{
|
||||
return NewChannel2(aURI, nullptr, aResult);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче