From d384919a6d773686ce97c6dcaaebf406f268f1dc Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Sun, 6 Apr 2003 20:33:38 +0000 Subject: [PATCH] Removing unused openURIVia function. Bug 200223, r+sr=sspitzer. --- uriloader/base/nsIURILoader.idl | 9 --------- uriloader/base/nsURILoader.cpp | 36 ++++++++++----------------------- 2 files changed, 11 insertions(+), 34 deletions(-) diff --git a/uriloader/base/nsIURILoader.idl b/uriloader/base/nsIURILoader.idl index 862621b25a3..6b1f64ee5eb 100644 --- a/uriloader/base/nsIURILoader.idl +++ b/uriloader/base/nsIURILoader.idl @@ -98,15 +98,6 @@ interface nsIURILoader : nsISupports in nsISupports aWindowContext); - /* same call as OpenURI except this one takes an IP address to use as well... - adapterBinding -> the local IP address to bind to - */ - - void openURIVia(in nsIChannel aChannel, - in boolean aIsContentPreferred, - in nsISupports aWindowContext, - in unsigned long adapterBinding); - /* stops an in progress load */ void stop(in nsISupports aLoadCookie); diff --git a/uriloader/base/nsURILoader.cpp b/uriloader/base/nsURILoader.cpp index 5ffe99807ba..6810dba2059 100644 --- a/uriloader/base/nsURILoader.cpp +++ b/uriloader/base/nsURILoader.cpp @@ -562,50 +562,36 @@ NS_IMETHODIMP nsURILoader::OpenURI(nsIChannel *channel, PRBool aIsContentPreferred, nsISupports * aWindowContext) { - return OpenURIVia(channel, aIsContentPreferred, aWindowContext, - 0 /* ip address */); -} - -NS_IMETHODIMP nsURILoader::OpenURIVia(nsIChannel *channel, - PRBool aIsContentPreferred, - nsISupports * aWindowContext, - PRUint32 aLocalIP) -{ - // we need to create a DocumentOpenInfo object which will go ahead and open the url - // and discover the content type.... - nsresult rv = NS_OK; - nsDocumentOpenInfo* loader = nsnull; - - if (!channel) return NS_ERROR_NULL_POINTER; + NS_ENSURE_ARG_POINTER(channel); // Let the window context's uriListener know that the open is starting. This // gives that window a chance to abort the load process. nsCOMPtr winContextListener(do_GetInterface(aWindowContext)); - if(winContextListener) { - // get channel from request + if (winContextListener) { nsCOMPtr uri; channel->GetURI(getter_AddRefs(uri)); - if(uri) { + if (uri) { PRBool doAbort = PR_FALSE; winContextListener->OnStartURIOpen(uri, &doAbort); - if(doAbort) - return NS_OK; + if (doAbort) { + return NS_OK; + } } } + // we need to create a DocumentOpenInfo object which will go ahead and open + // the url and discover the content type.... + nsCOMPtr loader; + NS_NEWXPCOM(loader, nsDocumentOpenInfo); if (!loader) return NS_ERROR_OUT_OF_MEMORY; - NS_ADDREF(loader); nsCOMPtr loadCookie; SetupLoadCookie(aWindowContext, getter_AddRefs(loadCookie)); // now instruct the loader to go ahead and open the url - rv = loader->Open(channel, aIsContentPreferred, aWindowContext); - NS_RELEASE(loader); - - return rv; + return loader->Open(channel, aIsContentPreferred, aWindowContext); } NS_IMETHODIMP nsURILoader::Stop(nsISupports* aLoadCookie)