diff --git a/netwerk/base/nsBaseChannel.cpp b/netwerk/base/nsBaseChannel.cpp index d12d518e012e..07a12c8fa5b6 100644 --- a/netwerk/base/nsBaseChannel.cpp +++ b/netwerk/base/nsBaseChannel.cpp @@ -12,7 +12,6 @@ #include "nsIContentSniffer.h" #include "nsIScriptSecurityManager.h" #include "nsMimeTypes.h" -#include "nsIHttpEventSink.h" #include "nsIHttpChannel.h" #include "nsIChannelEventSink.h" #include "nsIStreamConverterService.h" @@ -131,9 +130,7 @@ nsBaseChannel::Redirect(nsIChannel *newChannel, uint32_t redirectFlags, } } - // Notify consumer, giving chance to cancel redirect. For backwards compat, - // we support nsIHttpEventSink if we are an HTTP channel and if this is not - // an internal redirect. + // Notify consumer, giving chance to cancel redirect. RefPtr redirectCallbackHelper = new nsAsyncRedirectVerifyHelper(); @@ -158,23 +155,6 @@ nsBaseChannel::Redirect(nsIChannel *newChannel, uint32_t redirectFlags, nsresult nsBaseChannel::ContinueRedirect() { - // Backwards compat for non-internal redirects from a HTTP channel. - // XXX Is our http channel implementation going to derive from nsBaseChannel? - // If not, this code can be removed. - if (!(mRedirectFlags & nsIChannelEventSink::REDIRECT_INTERNAL)) { - nsCOMPtr httpChannel = do_QueryInterface(); - if (httpChannel) { - nsCOMPtr httpEventSink; - GetCallback(httpEventSink); - if (httpEventSink) { - nsresult rv = httpEventSink->OnRedirect(httpChannel, mRedirectChannel); - if (NS_FAILED(rv)) { - return rv; - } - } - } - } - // Make sure to do this _after_ making all the OnChannelRedirect calls mRedirectChannel->SetOriginalURI(OriginalURI()); diff --git a/netwerk/protocol/http/HttpChannelParentListener.cpp b/netwerk/protocol/http/HttpChannelParentListener.cpp index a10dd94f7bfd..2066f162a0cc 100644 --- a/netwerk/protocol/http/HttpChannelParentListener.cpp +++ b/netwerk/protocol/http/HttpChannelParentListener.cpp @@ -12,7 +12,6 @@ #include "mozilla/Unused.h" #include "nsIAuthPrompt.h" #include "nsIAuthPrompt2.h" -#include "nsIHttpEventSink.h" #include "nsIHttpHeaderVisitor.h" #include "nsIRedirectChannelRegistrar.h" #include "nsIPromptFactory.h" @@ -123,7 +122,6 @@ NS_IMETHODIMP HttpChannelParentListener::GetInterface(const nsIID& aIID, void **result) { if (aIID.Equals(NS_GET_IID(nsIChannelEventSink)) || - aIID.Equals(NS_GET_IID(nsIHttpEventSink)) || aIID.Equals(NS_GET_IID(nsINetworkInterceptController)) || aIID.Equals(NS_GET_IID(nsIRedirectResultListener))) { diff --git a/netwerk/protocol/http/moz.build b/netwerk/protocol/http/moz.build index ec866dd9876d..8d4baa53a75b 100644 --- a/netwerk/protocol/http/moz.build +++ b/netwerk/protocol/http/moz.build @@ -18,7 +18,6 @@ XPIDL_SOURCES += [ 'nsIHttpChannelAuthProvider.idl', 'nsIHttpChannelChild.idl', 'nsIHttpChannelInternal.idl', - 'nsIHttpEventSink.idl', 'nsIHttpHeaderVisitor.idl', 'nsIHttpProtocolHandler.idl', 'nsIRaceCacheWithNetwork.idl', diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp index c6ea71b0f1d8..c018705f3cf6 100644 --- a/netwerk/protocol/http/nsHttpChannel.cpp +++ b/netwerk/protocol/http/nsHttpChannel.cpp @@ -76,7 +76,6 @@ #include "nsICancelable.h" #include "nsIHttpChannelAuthProvider.h" #include "nsIHttpChannelInternal.h" -#include "nsIHttpEventSink.h" #include "nsIPrompt.h" #include "nsInputStreamPump.h" #include "nsURLHelper.h" @@ -3014,18 +3013,6 @@ nsHttpChannel::OpenRedirectChannel(nsresult rv) // i.e. after all sinks had been notified mRedirectChannel->SetOriginalURI(mOriginalURI); - // And now, notify observers the deprecated way - nsCOMPtr httpEventSink; - GetCallback(httpEventSink); - if (httpEventSink) { - // NOTE: nsIHttpEventSink is only used for compatibility with pre-1.8 - // versions. - rv = httpEventSink->OnRedirect(this, mRedirectChannel); - if (NS_FAILED(rv)) { - return rv; - } - } - // open new channel if (mLoadInfo && mLoadInfo->GetEnforceSecurity()) { MOZ_ASSERT(!mListenerContext, "mListenerContext should be null!"); @@ -5793,16 +5780,6 @@ nsHttpChannel::ContinueProcessRedirection(nsresult rv) // i.e. after all sinks had been notified mRedirectChannel->SetOriginalURI(mOriginalURI); - // And now, the deprecated way - nsCOMPtr httpEventSink; - GetCallback(httpEventSink); - if (httpEventSink) { - // NOTE: nsIHttpEventSink is only used for compatibility with pre-1.8 - // versions. - rv = httpEventSink->OnRedirect(this, mRedirectChannel); - if (NS_FAILED(rv)) - return rv; - } // XXX we used to talk directly with the script security manager, but that // should really be handled by the event sink implementation. diff --git a/netwerk/protocol/http/nsIHttpEventSink.idl b/netwerk/protocol/http/nsIHttpEventSink.idl deleted file mode 100644 index 5db2e1a30da5..000000000000 --- a/netwerk/protocol/http/nsIHttpEventSink.idl +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* 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 "nsISupports.idl" - -interface nsIChannel; -interface nsIHttpChannel; -interface nsIURI; - -/** - * nsIHttpEventSink - * - * Implement this interface to receive control over various HTTP events. The - * HTTP channel will try to get this interface from its notificationCallbacks - * attribute, and if it doesn't find it there it will look for it from its - * loadGroup's notificationCallbacks attribute. - * - * These methods are called before onStartRequest, and should be handled - * SYNCHRONOUSLY. - * - * @deprecated Newly written code should use nsIChannelEventSink instead of this - * interface. - */ -[scriptable, uuid(9475a6af-6352-4251-90f9-d65b1cd2ea15)] -interface nsIHttpEventSink : nsISupports -{ - /** - * Called when a redirect occurs due to a HTTP response like 302. The - * redirection may be to a non-http channel. - * - * @return failure cancels redirect - */ - [must_use] void onRedirect(in nsIHttpChannel httpChannel, - in nsIChannel newChannel); -}; diff --git a/toolkit/components/search/nsSearchService.js b/toolkit/components/search/nsSearchService.js index cc9406165c94..530219d63d7e 100644 --- a/toolkit/components/search/nsSearchService.js +++ b/toolkit/components/search/nsSearchService.js @@ -286,8 +286,6 @@ loadListener.prototype = { Ci.nsIStreamListener, Ci.nsIChannelEventSink, Ci.nsIInterfaceRequestor, - // See FIXME comment below. - Ci.nsIHttpEventSink, Ci.nsIProgressEventSink ]), @@ -338,9 +336,6 @@ loadListener.prototype = { return this.QueryInterface(aIID); }, - // FIXME: bug 253127 - // nsIHttpEventSink - onRedirect(aChannel, aNewChannel) {}, // nsIProgressEventSink onProgress(aRequest, aContext, aProgress, aProgressMax) {}, onStatus(aRequest, aContext, aStatus, aStatusArg) {}