diff --git a/netwerk/build/nsNetCID.h b/netwerk/build/nsNetCID.h index 8c5609d966ad..c593d241da2b 100644 --- a/netwerk/build/nsNetCID.h +++ b/netwerk/build/nsNetCID.h @@ -576,16 +576,6 @@ {0x9f, 0xd4, 0xe0, 0x65, 0xe8, 0x55, 0x68, 0xf4} \ } -#define NS_HTTPCHANNELAUTHPROVIDER_CONTRACTID \ - "@mozilla.org/network/http-channel-auth-provider;1" -#define NS_HTTPCHANNELAUTHPROVIDER_CID \ -{ /* 02f5a8d8-4ef3-48b1-b527-8a643056abbd */ \ - 0x02f5a8d8, \ - 0x4ef3, \ - 0x48b1, \ - {0xb5, 0x27, 0x8a, 0x64, 0x30, 0x56, 0xab, 0xbd} \ -} - // component implementing nsIHttpPushListener. #define NS_HTTPPUSHLISTENER_CONTRACTID \ "@mozilla.org/network/push-listener;1" diff --git a/netwerk/build/nsNetModule.cpp b/netwerk/build/nsNetModule.cpp index 0189f3e81105..edb298d18896 100644 --- a/netwerk/build/nsNetModule.cpp +++ b/netwerk/build/nsNetModule.cpp @@ -238,7 +238,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFtpProtocolHandler, Init) #undef LOG #undef LOG_ENABLED #include "nsHttpAuthManager.h" -#include "nsHttpChannelAuthProvider.h" #include "nsHttpBasicAuth.h" #include "nsHttpDigestAuth.h" #include "nsHttpNTLMAuth.h" @@ -253,7 +252,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpNTLMAuth) NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsHttpHandler, nsHttpHandler::GetInstance) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHttpsHandler, Init) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHttpAuthManager, Init) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpChannelAuthProvider) NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpActivityDistributor) NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpBasicAuth) NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpDigestAuth) @@ -710,7 +708,6 @@ NS_DEFINE_NAMED_CID(NS_HTTPBASICAUTH_CID); NS_DEFINE_NAMED_CID(NS_HTTPDIGESTAUTH_CID); NS_DEFINE_NAMED_CID(NS_HTTPNTLMAUTH_CID); NS_DEFINE_NAMED_CID(NS_HTTPAUTHMANAGER_CID); -NS_DEFINE_NAMED_CID(NS_HTTPCHANNELAUTHPROVIDER_CID); NS_DEFINE_NAMED_CID(NS_HTTPACTIVITYDISTRIBUTOR_CID); NS_DEFINE_NAMED_CID(NS_THROTTLEQUEUE_CID); NS_DEFINE_NAMED_CID(NS_BACKGROUNDCHANNELREGISTRAR_CID); @@ -827,7 +824,6 @@ static const mozilla::Module::CIDEntry kNeckoCIDs[] = { { &kNS_HTTPDIGESTAUTH_CID, false, nullptr, mozilla::net::nsHttpDigestAuthConstructor }, { &kNS_HTTPNTLMAUTH_CID, false, nullptr, mozilla::net::nsHttpNTLMAuthConstructor }, { &kNS_HTTPAUTHMANAGER_CID, false, nullptr, mozilla::net::nsHttpAuthManagerConstructor }, - { &kNS_HTTPCHANNELAUTHPROVIDER_CID, false, nullptr, mozilla::net::nsHttpChannelAuthProviderConstructor }, { &kNS_HTTPACTIVITYDISTRIBUTOR_CID, false, nullptr, mozilla::net::nsHttpActivityDistributorConstructor }, { &kNS_THROTTLEQUEUE_CID, false, nullptr, mozilla::net::ThrottleQueueConstructor }, { &kNS_BACKGROUNDCHANNELREGISTRAR_CID, false, nullptr, mozilla::net::BackgroundChannelRegistrarConstructor }, @@ -950,7 +946,6 @@ static const mozilla::Module::ContractIDEntry kNeckoContracts[] = { { NS_HTTP_AUTHENTICATOR_CONTRACTID_PREFIX "digest", &kNS_HTTPDIGESTAUTH_CID }, { NS_HTTP_AUTHENTICATOR_CONTRACTID_PREFIX "ntlm", &kNS_HTTPNTLMAUTH_CID }, { NS_HTTPAUTHMANAGER_CONTRACTID, &kNS_HTTPAUTHMANAGER_CID }, - { NS_HTTPCHANNELAUTHPROVIDER_CONTRACTID, &kNS_HTTPCHANNELAUTHPROVIDER_CID }, { NS_HTTPACTIVITYDISTRIBUTOR_CONTRACTID, &kNS_HTTPACTIVITYDISTRIBUTOR_CID }, { NS_THROTTLEQUEUE_CONTRACTID, &kNS_THROTTLEQUEUE_CID }, { NS_BACKGROUNDCHANNELREGISTRAR_CONTRACTID, &kNS_BACKGROUNDCHANNELREGISTRAR_CID }, diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp index ede205d505f1..6b35231785e5 100644 --- a/netwerk/protocol/http/nsHttpChannel.cpp +++ b/netwerk/protocol/http/nsHttpChannel.cpp @@ -15,6 +15,7 @@ #include "nsHttp.h" #include "nsHttpChannel.h" +#include "nsHttpChannelAuthProvider.h" #include "nsHttpHandler.h" #include "nsIApplicationCacheService.h" #include "nsIApplicationCacheContainer.h" @@ -6492,11 +6493,8 @@ nsHttpChannel::BeginConnect() Telemetry::Accumulate(Telemetry::HTTP_TRANSACTION_USE_ALTSVC, false); } - mAuthProvider = - do_CreateInstance("@mozilla.org/network/http-channel-auth-provider;1", - &rv); - if (NS_SUCCEEDED(rv)) - rv = mAuthProvider->Init(this); + mAuthProvider = new nsHttpChannelAuthProvider(); + rv = mAuthProvider->Init(this); if (NS_FAILED(rv)) { return rv; } diff --git a/netwerk/protocol/http/nsHttpChannelAuthProvider.h b/netwerk/protocol/http/nsHttpChannelAuthProvider.h index 361524fe5add..80b95db76d33 100644 --- a/netwerk/protocol/http/nsHttpChannelAuthProvider.h +++ b/netwerk/protocol/http/nsHttpChannelAuthProvider.h @@ -25,9 +25,10 @@ namespace mozilla { namespace net { class nsHttpHandler; -class nsHttpChannelAuthProvider : public nsIHttpChannelAuthProvider - , public nsIAuthPromptCallback - , public nsIHttpAuthenticatorCallback +class nsHttpChannelAuthProvider final + : public nsIHttpChannelAuthProvider + , public nsIAuthPromptCallback + , public nsIHttpAuthenticatorCallback { public: NS_DECL_ISUPPORTS