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
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -1534,13 +1534,6 @@
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsAboutConfig.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsURIChecker.cpp</PATH>
|
||||
@@ -2011,11 +2004,6 @@
|
||||
<PATH>nsSOCKS4SocketProvider.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsAboutConfig.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsURIChecker.cpp</PATH>
|
||||
@@ -3544,13 +3532,6 @@
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsAboutConfig.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsURIChecker.cpp</PATH>
|
||||
@@ -4021,11 +4002,6 @@
|
||||
<PATH>nsSOCKS4SocketProvider.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsAboutConfig.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsURIChecker.cpp</PATH>
|
||||
@@ -5540,13 +5516,6 @@
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsAboutConfig.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsURIChecker.cpp</PATH>
|
||||
@@ -6007,11 +5976,6 @@
|
||||
<PATH>nsSOCKS4SocketProvider.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsAboutConfig.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsURIChecker.cpp</PATH>
|
||||
@@ -7526,13 +7490,6 @@
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsAboutConfig.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsURIChecker.cpp</PATH>
|
||||
@@ -7993,11 +7950,6 @@
|
||||
<PATH>nsSOCKS4SocketProvider.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsAboutConfig.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsURIChecker.cpp</PATH>
|
||||
@@ -8305,12 +8257,6 @@
|
||||
<PATH>nsAboutCacheEntry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Necko.shlb</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsAboutConfig.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Necko.shlb</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -41,7 +41,6 @@ CPP_OBJS= \
|
||||
.\$(OBJDIR)\nsAboutRedirector.obj \
|
||||
.\$(OBJDIR)\nsAboutCache.obj \
|
||||
.\$(OBJDIR)\nsAboutCacheEntry.obj \
|
||||
.\$(OBJDIR)\nsAboutConfig.obj \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
@@ -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 <chipc@netscape.com>
|
||||
*
|
||||
* 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<nsIIOService> 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;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -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 <sford@swbell.com>
|
||||
* Dawn Endico <endico@mozilla.org>
|
||||
*
|
||||
* 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__
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user