From 1face598cbfeb41c76e751593421b40a02d82125 Mon Sep 17 00:00:00 2001 From: "cbiesinger%web.de" Date: Wed, 27 Feb 2002 11:54:35 +0000 Subject: [PATCH] bug 127252 r=gagan sr=darin a=asa about:config should use redirector git-svn-id: svn://10.0.0.236/trunk@115418 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/netwerk/build/nsNetModule.cpp | 4 +- mozilla/netwerk/macbuild/netwerk.xml | 54 ------------- .../netwerk/protocol/about/src/Makefile.in | 3 +- .../netwerk/protocol/about/src/makefile.win | 1 - .../protocol/about/src/nsAboutConfig.cpp | 75 ------------------- .../protocol/about/src/nsAboutConfig.h | 69 ----------------- .../protocol/about/src/nsAboutRedirector.cpp | 5 +- 7 files changed, 6 insertions(+), 205 deletions(-) delete mode 100644 mozilla/netwerk/protocol/about/src/nsAboutConfig.cpp delete mode 100644 mozilla/netwerk/protocol/about/src/nsAboutConfig.h diff --git a/mozilla/netwerk/build/nsNetModule.cpp b/mozilla/netwerk/build/nsNetModule.cpp index a8390db7365..cd086030e8c 100644 --- a/mozilla/netwerk/build/nsNetModule.cpp +++ b/mozilla/netwerk/build/nsNetModule.cpp @@ -968,9 +968,9 @@ static const nsModuleComponentInfo gNetModuleInfo[] = { nsAboutBloat::Create }, { "about:config", - NS_ABOUT_CONFIG_MODULE_CID, + NS_ABOUT_REDIRECTOR_MODULE_CID, NS_ABOUT_MODULE_CONTRACTID_PREFIX "config", - nsAboutConfig::Create + nsAboutRedirector::Create }, { "about:credits", NS_ABOUT_REDIRECTOR_MODULE_CID, diff --git a/mozilla/netwerk/macbuild/netwerk.xml b/mozilla/netwerk/macbuild/netwerk.xml index f4c191074bf..9d21312b434 100644 --- a/mozilla/netwerk/macbuild/netwerk.xml +++ b/mozilla/netwerk/macbuild/netwerk.xml @@ -1534,13 +1534,6 @@ Text Debug - - Name - nsAboutConfig.cpp - MacOS - Text - Debug - Name nsURIChecker.cpp @@ -2011,11 +2004,6 @@ nsSOCKS4SocketProvider.cpp MacOS - - Name - nsAboutConfig.cpp - MacOS - Name nsURIChecker.cpp @@ -3544,13 +3532,6 @@ Text Debug - - Name - nsAboutConfig.cpp - MacOS - Text - Debug - Name nsURIChecker.cpp @@ -4021,11 +4002,6 @@ nsSOCKS4SocketProvider.cpp MacOS - - Name - nsAboutConfig.cpp - MacOS - Name nsURIChecker.cpp @@ -5540,13 +5516,6 @@ Text Debug - - Name - nsAboutConfig.cpp - MacOS - Text - Debug - Name nsURIChecker.cpp @@ -6007,11 +5976,6 @@ nsSOCKS4SocketProvider.cpp MacOS - - Name - nsAboutConfig.cpp - MacOS - Name nsURIChecker.cpp @@ -7526,13 +7490,6 @@ Text Debug - - Name - nsAboutConfig.cpp - MacOS - Text - Debug - Name nsURIChecker.cpp @@ -7993,11 +7950,6 @@ nsSOCKS4SocketProvider.cpp MacOS - - Name - nsAboutConfig.cpp - MacOS - Name nsURIChecker.cpp @@ -8305,12 +8257,6 @@ nsAboutCacheEntry.cpp MacOS - - Necko.shlb - Name - nsAboutConfig.cpp - MacOS - Necko.shlb Name diff --git a/mozilla/netwerk/protocol/about/src/Makefile.in b/mozilla/netwerk/protocol/about/src/Makefile.in index 1c9e26d93ae..9cf71beed62 100644 --- a/mozilla/netwerk/protocol/about/src/Makefile.in +++ b/mozilla/netwerk/protocol/about/src/Makefile.in @@ -42,8 +42,7 @@ CPPSRCS = \ nsAboutBloat.cpp \ nsAboutCache.cpp \ nsAboutCacheEntry.cpp \ - nsAboutConfig.cpp \ - nsAboutRedirector.cpp \ + nsAboutRedirector.cpp \ $(NULL) # we don't want the shared lib, but we want to force the creation of a diff --git a/mozilla/netwerk/protocol/about/src/makefile.win b/mozilla/netwerk/protocol/about/src/makefile.win index 963b22945c0..b2f72121f8f 100644 --- a/mozilla/netwerk/protocol/about/src/makefile.win +++ b/mozilla/netwerk/protocol/about/src/makefile.win @@ -41,7 +41,6 @@ CPP_OBJS= \ .\$(OBJDIR)\nsAboutRedirector.obj \ .\$(OBJDIR)\nsAboutCache.obj \ .\$(OBJDIR)\nsAboutCacheEntry.obj \ - .\$(OBJDIR)\nsAboutConfig.obj \ $(NULL) include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/netwerk/protocol/about/src/nsAboutConfig.cpp b/mozilla/netwerk/protocol/about/src/nsAboutConfig.cpp deleted file mode 100644 index ce9a7237818..00000000000 --- a/mozilla/netwerk/protocol/about/src/nsAboutConfig.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Contributor(s): Chip Clark - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the NPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#include "nsAboutConfig.h" -#include "nsIIOService.h" -#include "nsIServiceManager.h" -#include "nsCOMPtr.h" -#include "nsIURI.h" -#include "nsNetCID.h" - -static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); - -NS_IMPL_ISUPPORTS1(nsAboutConfig, nsIAboutModule) - -static const char kPrefPage[] = "chrome://global/content/config.xul"; - -NS_IMETHODIMP -nsAboutConfig::NewChannel(nsIURI *aURI, nsIChannel **result) -{ - nsresult rv; - nsCOMPtr ioService(do_GetService(kIOServiceCID, &rv)); - if (NS_FAILED(rv)) - return rv; - rv = ioService->NewChannel(kPrefPage, nsnull, result); - return rv; -} - -NS_METHOD -nsAboutConfig::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) -{ - nsAboutConfig* about = new nsAboutConfig(); - if (about == nsnull) - return NS_ERROR_OUT_OF_MEMORY; - NS_ADDREF(about); - nsresult rv = about->QueryInterface(aIID, aResult); - NS_RELEASE(about); - return rv; -} - -//////////////////////////////////////////////////////////////////////////////// diff --git a/mozilla/netwerk/protocol/about/src/nsAboutConfig.h b/mozilla/netwerk/protocol/about/src/nsAboutConfig.h deleted file mode 100644 index 6c3552b5cec..00000000000 --- a/mozilla/netwerk/protocol/about/src/nsAboutConfig.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Contributor(s): Sammy Ford - * Dawn Endico - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the NPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#ifndef nsAboutConfig_h__ -#define nsAboutConfig_h__ - -#include "nsIAboutModule.h" - -class nsAboutConfig : public nsIAboutModule -{ -public: - NS_DECL_ISUPPORTS - - NS_DECL_NSIABOUTMODULE - - nsAboutConfig() { NS_INIT_REFCNT(); } - virtual ~nsAboutConfig() {} - - static NS_METHOD - Create(nsISupports *aOuter, REFNSIID aIID, void **aResult); - -protected: -}; - -#define NS_ABOUT_CONFIG_MODULE_CID \ -{ /* 5b9cd4b2-1dd2-11b2-85a8-f86404a6cff3 */ \ - 0x5b9cd4b2, \ - 0x1dd2, \ - 0x11b2, \ - {0x85, 0xa8, 0xf8, 0x64, 0x04, 0xa6, 0xcf, 0xf3} \ -} - -#endif // nsAboutConfig_h__ diff --git a/mozilla/netwerk/protocol/about/src/nsAboutRedirector.cpp b/mozilla/netwerk/protocol/about/src/nsAboutRedirector.cpp index 498913e8b1f..8c0032868c3 100644 --- a/mozilla/netwerk/protocol/about/src/nsAboutRedirector.cpp +++ b/mozilla/netwerk/protocol/about/src/nsAboutRedirector.cpp @@ -54,9 +54,10 @@ NS_IMPL_ISUPPORTS1(nsAboutRedirector, nsIAboutModule) static const char *kRedirMap[][2] = { { "credits", "http://www.mozilla.org/credits/" }, { "mozilla", "chrome://global/content/mozilla.html" }, - { "plugins", "chrome://global/content/plugins.html" } + { "plugins", "chrome://global/content/plugins.html" }, + { "config", "chrome://global/content/config.xul" } }; -static const int kRedirTotal = 3; // sizeof(kRedirMap)/sizeof(*kRedirMap) +static const int kRedirTotal = 4; // sizeof(kRedirMap)/sizeof(*kRedirMap) NS_IMETHODIMP nsAboutRedirector::NewChannel(nsIURI *aURI, nsIChannel **result)