Bug 499123 - Coalesce browser about: pages. r=dietrich/gavin, a=beltzner
authorRyan Flint <rflint@ryanflint.com>
Fri, 25 Sep 2009 20:24:02 -0400
changeset 31940 3b4fc1fe716300cf0c145d795b93ef19bea82b71
parent 31939 dc6401e1a1b783959c75e0fe160126a087e1e6cc
child 31941 94cd21e19ccaf848b18a1c35618fec044efa9424
push id250
push userrflint@ryanflint.com
push dateSat, 26 Sep 2009 00:26:28 +0000
reviewersdietrich, gavin, beltzner
bugs499123
milestone1.9.2b1pre
Bug 499123 - Coalesce browser about: pages. r=dietrich/gavin, a=beltzner
browser/components/Makefile.in
browser/components/about/AboutRedirector.cpp
browser/components/about/AboutRedirector.h
browser/components/aboutRights.js
browser/components/aboutRobots.js
browser/components/build/Makefile.in
browser/components/build/nsBrowserCompsCID.h
browser/components/build/nsModule.cpp
browser/components/certerror/Makefile.in
browser/components/certerror/aboutCertError.js
browser/components/feeds/src/Makefile.in
browser/components/feeds/src/nsAboutFeeds.cpp
browser/components/feeds/src/nsAboutFeeds.h
browser/components/privatebrowsing/src/Makefile.in
browser/components/privatebrowsing/src/aboutPrivateBrowsing.js
browser/components/safebrowsing/content/application.js
browser/components/safebrowsing/src/nsSafebrowsingApplication.js
browser/components/sessionstore/src/Makefile.in
browser/components/sessionstore/src/aboutSessionRestore.js
browser/installer/package-manifest.in
browser/installer/removed-files.in
--- a/browser/components/Makefile.in
+++ b/browser/components/Makefile.in
@@ -48,23 +48,22 @@ XPIDL_MODULE = browsercompsbase
 XPIDLSRCS = \
 	nsIBrowserHandler.idl \
 	nsIBrowserGlue.idl \
 	$(NULL)
 
 EXTRA_PP_COMPONENTS = \
 	nsBrowserContentHandler.js \
 	nsBrowserGlue.js \
-	aboutRights.js \
-	aboutRobots.js \
 	$(NULL)
 
 EXTRA_JS_MODULES = distribution.js
 
 DIRS = \
+	about \
 	certerror \
 	dirprovider \
 	microsummaries \
 	preferences \
 	search \
 	sessionstore \
 	shell \
 	sidebar \
copy from docshell/base/nsAboutRedirector.cpp
copy to browser/components/about/AboutRedirector.cpp
--- a/docshell/base/nsAboutRedirector.cpp
+++ b/browser/components/about/AboutRedirector.cpp
@@ -1,10 +1,9 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* vim:set ts=4 sw=4 sts=4 et cindent: */
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  *
  * The contents of this file are subject to the Mozilla 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/MPL/
  *
@@ -17,163 +16,170 @@
  *
  * 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):
  *   Gagan Saksena (original author)
+ *   Ryan Flint <rflint@mozilla.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 MPL, 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 MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-#include "nsAboutRedirector.h"
+// See also: docshell/base/nsAboutRedirector.cpp
+
+#include "AboutRedirector.h"
 #include "nsNetUtil.h"
-#include "plstr.h"
 #include "nsIScriptSecurityManager.h"
-#include "nsAboutProtocolUtils.h"
 
-NS_IMPL_ISUPPORTS1(nsAboutRedirector, nsIAboutModule)
+namespace mozilla {
+namespace browser {
+
+NS_IMPL_ISUPPORTS1(AboutRedirector, nsIAboutModule)
 
 struct RedirEntry {
-    const char* id;
-    const char* url;
-    PRUint32 flags;  // See nsIAboutModule.  The URI_SAFE_FOR_UNTRUSTED_CONTENT
-                     // flag does double duty here -- if it's not set, we don't
-                     // drop chrome privileges.
+  const char* id;
+  const char* url;
+  PRUint32 flags;  // See nsIAboutModule.  The URI_SAFE_FOR_UNTRUSTED_CONTENT
+                   // flag does double duty here -- if it's not set, we don't
+                   // drop chrome privileges.
 };
 
 /*
   Entries which do not have URI_SAFE_FOR_UNTRUSTED_CONTENT will run with chrome
   privileges. This is potentially dangerous. Please use
   URI_SAFE_FOR_UNTRUSTED_CONTENT in the third argument to each map item below
   unless your about: page really needs chrome privileges. Security review is
   required before adding new map entries without
   URI_SAFE_FOR_UNTRUSTED_CONTENT.  Also note, however, that adding
   URI_SAFE_FOR_UNTRUSTED_CONTENT will allow random web sites to link to that
   URI.  Perhaps we should separate the two concepts out...
  */
 static RedirEntry kRedirMap[] = {
-    { "credits", "http://www.mozilla.org/credits/",
-      nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT },
-    { "mozilla", "chrome://global/content/mozilla.xhtml",
-      nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT },
-    { "plugins", "chrome://global/content/plugins.html", 0 },
-    { "config", "chrome://global/content/config.xul", 0 },
-#ifdef MOZ_CRASHREPORTER
-    { "crashes", "chrome://global/content/crashes.xhtml", 0 },
+#ifdef MOZ_SAFE_BROWSING
+  { "blocked", "chrome://browser/content/safebrowsing/blockedSite.xhtml",
+    nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
+    nsIAboutModule::ALLOW_SCRIPT },
 #endif
-    { "logo", "chrome://branding/content/about.png",
-      nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT},
-    { "buildconfig", "chrome://global/content/buildconfig.html",
-      nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT },
-    { "license", "chrome://global/content/license.html",
-      nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT },
-    { "licence", "chrome://global/content/license.html",
-      nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT },
-    { "neterror", "chrome://global/content/netError.xhtml",
-      nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
-      nsIAboutModule::ALLOW_SCRIPT }
+  { "certerror", "chrome://browser/content/certerror/aboutCertError.xhtml",
+    nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
+    nsIAboutModule::ALLOW_SCRIPT },
+  { "feeds", "chrome://browser/content/feeds/subscribe.xhtml",
+    nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
+    nsIAboutModule::ALLOW_SCRIPT },
+  { "privatebrowsing", "chrome://browser/content/aboutPrivateBrowsing.xhtml",
+    nsIAboutModule::ALLOW_SCRIPT },
+  { "rights", "chrome://browser/content/aboutRights.xhtml",
+    nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
+    nsIAboutModule::ALLOW_SCRIPT },
+  { "robots", "chrome://browser/content/aboutRobots.xhtml",
+    nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
+    nsIAboutModule::ALLOW_SCRIPT },
+  { "sessionrestore", "chrome://browser/content/aboutSessionRestore.xhtml",
+    nsIAboutModule::ALLOW_SCRIPT }
 };
 static const int kRedirTotal = NS_ARRAY_LENGTH(kRedirMap);
 
-NS_IMETHODIMP
-nsAboutRedirector::NewChannel(nsIURI *aURI, nsIChannel **result)
+static nsCAutoString
+GetAboutModuleName(nsIURI *aURI)
 {
-    NS_ENSURE_ARG_POINTER(aURI);
-    NS_ASSERTION(result, "must not be null");
-
-    nsresult rv;
-
-    nsCAutoString path;
-    rv = NS_GetAboutModuleName(aURI, path);
-    if (NS_FAILED(rv))
-        return rv;
-
-    nsCOMPtr<nsIIOService> ioService = do_GetIOService(&rv);
-    if (NS_FAILED(rv))
-        return rv;
-
-    for (int i=0; i<kRedirTotal; i++) 
-    {
-        if (!strcmp(path.get(), kRedirMap[i].id))
-        {
-            nsCOMPtr<nsIChannel> tempChannel;
-            rv = ioService->NewChannel(nsDependentCString(kRedirMap[i].url),
-                                       nsnull, nsnull, getter_AddRefs(tempChannel));
-            if (NS_FAILED(rv))
-                return rv;
+  nsCAutoString path;
+  aURI->GetPath(path);
 
-            tempChannel->SetOriginalURI(aURI);
+  PRInt32 f = path.FindChar('#');
+  if (f >= 0)
+    path.SetLength(f);
 
-            // Keep the page from getting unnecessary privileges unless it needs them
-            if (kRedirMap[i].flags &
-                nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT)
-            {
-                nsCOMPtr<nsIScriptSecurityManager> securityManager = 
-                         do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv);
-                if (NS_FAILED(rv))
-                    return rv;
-            
-                nsCOMPtr<nsIPrincipal> principal;
-                rv = securityManager->GetCodebasePrincipal(aURI, getter_AddRefs(principal));
-                if (NS_FAILED(rv))
-                    return rv;
-            
-                rv = tempChannel->SetOwner(principal);
-                if (NS_FAILED(rv))
-                    return rv;
-            }
+  f = path.FindChar('?');
+  if (f >= 0)
+    path.SetLength(f);
 
-            NS_ADDREF(*result = tempChannel);
-            return rv;
-        }
-    }
-
-    NS_ERROR("nsAboutRedirector called for unknown case");
-    return NS_ERROR_ILLEGAL_VALUE;
+  ToLowerCase(path);
+  return path;
 }
 
 NS_IMETHODIMP
-nsAboutRedirector::GetURIFlags(nsIURI *aURI, PRUint32 *result)
+AboutRedirector::NewChannel(nsIURI *aURI, nsIChannel **result) 
 {
-    NS_ENSURE_ARG_POINTER(aURI);
+  NS_ENSURE_ARG_POINTER(aURI);
+  NS_ASSERTION(result, "must not be null");
+
+  nsCAutoString path = GetAboutModuleName(aURI);
+
+  nsresult rv;
+  nsCOMPtr<nsIIOService> ioService = do_GetIOService(&rv);
+  NS_ENSURE_SUCCESS(rv, rv);
 
-    nsCAutoString name;
-    nsresult rv = NS_GetAboutModuleName(aURI, name);
-    NS_ENSURE_SUCCESS(rv, rv);
+  for (int i = 0; i < kRedirTotal; i++) {
+    if (!strcmp(path.get(), kRedirMap[i].id)) {
+      nsCOMPtr<nsIChannel> tempChannel;
+      rv = ioService->NewChannel(nsDependentCString(kRedirMap[i].url),
+                                 nsnull, nsnull, getter_AddRefs(tempChannel));
+      NS_ENSURE_SUCCESS(rv, rv);
+
+      tempChannel->SetOriginalURI(aURI);
+
+      // Keep the page from getting unnecessary privileges unless it needs them
+      if (kRedirMap[i].flags & nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT) {
+        nsCOMPtr<nsIScriptSecurityManager> securityManager =
+          do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv);
+        NS_ENSURE_SUCCESS(rv, rv);
 
-    for (int i=0; i < kRedirTotal; i++) 
-    {
-        if (name.EqualsASCII(kRedirMap[i].id))
-        {
-            *result = kRedirMap[i].flags;
-            return NS_OK;
-        }
+        nsCOMPtr<nsIPrincipal> principal;
+        rv = securityManager->GetCodebasePrincipal(aURI, getter_AddRefs(principal));
+        NS_ENSURE_SUCCESS(rv, rv);
+
+        rv = tempChannel->SetOwner(principal);
+        NS_ENSURE_SUCCESS(rv, rv);
+      }
+
+      NS_ADDREF(*result = tempChannel);
+      return rv;
     }
+  }
 
-    NS_ERROR("nsAboutRedirector called for unknown case");
-    return NS_ERROR_ILLEGAL_VALUE;
+  return NS_ERROR_ILLEGAL_VALUE;
+}
+
+NS_IMETHODIMP
+AboutRedirector::GetURIFlags(nsIURI *aURI, PRUint32 *result)
+{
+  NS_ENSURE_ARG_POINTER(aURI);
+
+  nsCAutoString name = GetAboutModuleName(aURI);
+
+  for (int i = 0; i < kRedirTotal; i++) {
+    if (name.Equals(kRedirMap[i].id)) {
+      *result = kRedirMap[i].flags;
+      return NS_OK;
+    }
+  }
+
+  return NS_ERROR_ILLEGAL_VALUE;
 }
 
 NS_METHOD
-nsAboutRedirector::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)
+AboutRedirector::Create(nsISupports *aOuter, REFNSIID aIID, void **result)
 {
-    nsAboutRedirector* about = new nsAboutRedirector();
-    if (about == nsnull)
-        return NS_ERROR_OUT_OF_MEMORY;
-    NS_ADDREF(about);
-    nsresult rv = about->QueryInterface(aIID, aResult);
-    NS_RELEASE(about);
-    return rv;
+  AboutRedirector* about = new AboutRedirector();
+  if (about == nsnull)
+    return NS_ERROR_OUT_OF_MEMORY;
+  NS_ADDREF(about);
+  nsresult rv = about->QueryInterface(aIID, result);
+  NS_RELEASE(about);
+  return rv;
 }
+
+} // namespace browser
+} // namespace mozilla
copy from docshell/base/nsAboutRedirector.h
copy to browser/components/about/AboutRedirector.h
--- a/docshell/base/nsAboutRedirector.h
+++ b/browser/components/about/AboutRedirector.h
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  *
  * The contents of this file are subject to the Mozilla 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/MPL/
  *
@@ -16,53 +16,51 @@
  *
  * 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):
  *   Gagan Saksena (original author)
+ *   Ryan Flint <rflint@mozilla.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 MPL, 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 MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-#ifndef nsAboutRedirector_h__
-#define nsAboutRedirector_h__
+#ifndef AboutRedirector_h__
+#define AboutRedirector_h__
 
 #include "nsIAboutModule.h"
 
-class nsAboutRedirector : public nsIAboutModule
+namespace mozilla {
+namespace browser {
+
+class AboutRedirector : public nsIAboutModule
 {
 public:
-    NS_DECL_ISUPPORTS
-
-    NS_DECL_NSIABOUTMODULE
+  NS_DECL_ISUPPORTS
+  NS_DECL_NSIABOUTMODULE
+ 
+  AboutRedirector() {}
+  virtual ~AboutRedirector() {}
 
-    nsAboutRedirector() {}
-    virtual ~nsAboutRedirector() {}
-
-    static NS_METHOD
+  static NS_METHOD
     Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
 
 protected:
 };
 
-#define NS_ABOUT_REDIRECTOR_MODULE_CID               \
-{ /*  f0acde16-1dd1-11b2-9e35-f5786fff5a66*/         \
-    0xf0acde16,                                      \
-    0x1dd1,                                          \
-    0x11b2,                                          \
-    {0x9e, 0x35, 0xf5, 0x78, 0x6f, 0xff, 0x5a, 0x66} \
-}
+} // namespace browser
+} // namespace mozilla
 
-#endif // nsAboutRedirector_h__
+#endif // AboutRedirector_h__
deleted file mode 100644
--- a/browser/components/aboutRights.js
+++ /dev/null
@@ -1,77 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla 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/MPL/
- *
- * 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 about:robots.
- *
- * The Initial Developer of the Original Code is Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2008
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Ryan Flint <rflint@mozilla.com>
- *   Justin Dolske <dolske@mozilla.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 MPL, 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 MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-function AboutRights() {}
-AboutRights.prototype = {
-  classDescription: "about:rights",
-  contractID: "@mozilla.org/network/protocol/about;1?what=rights",
-  classID: Components.ID("{89e9da80-4c03-46a0-a357-cf77bbef98b9}"),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
- 
-  getURIFlags: function(aURI) {
-    return (Ci.nsIAboutModule.ALLOW_SCRIPT |
-            Ci.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT);
-  },
-
-  newChannel: function(aURI) {
-    var ios = Cc["@mozilla.org/network/io-service;1"].
-              getService(Ci.nsIIOService);
-
-    var secMan = Cc["@mozilla.org/scriptsecuritymanager;1"].
-                 getService(Ci.nsIScriptSecurityManager);
-
-#ifdef OFFICIAL_BUILD
-    var sourceURL = "chrome://global/content/aboutRights.xhtml";
-#else
-    var sourceURL = "chrome://global/content/aboutRights-unbranded.xhtml";
-#endif
-    var channel = ios.newChannel(sourceURL, null, null);
-    var principal = secMan.getCodebasePrincipal(aURI);
-
-    channel.originalURI = aURI;
-    channel.owner = principal;
-
-    return channel;
-  }
-};
-
-function NSGetModule(compMgr, fileSpec)
-  XPCOMUtils.generateModule([AboutRights]);
deleted file mode 100644
--- a/browser/components/aboutRobots.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla 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/MPL/
- *
- * 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 About:IceCream.
- *
- * The Initial Developer of the Original Code is Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2008
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Ryan Flint <rflint@mozilla.com>
- *   Justin Dolske <dolske@mozilla.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 MPL, 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 MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-function AboutRobots() {}
-AboutRobots.prototype = {
-  classDescription: "About Robots",
-  contractID: "@mozilla.org/network/protocol/about;1?what=robots",
-  classID: Components.ID("{e18da21c-a4b8-4be5-98aa-942e1e19f35c}"),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
- 
-  getURIFlags: function(aURI) {
-    return (Ci.nsIAboutModule.ALLOW_SCRIPT |
-            Ci.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT);
-  },
-
-  newChannel: function(aURI) {
-    var ios = Cc["@mozilla.org/network/io-service;1"].
-              getService(Ci.nsIIOService);
-
-    var secMan = Cc["@mozilla.org/scriptsecuritymanager;1"].
-                 getService(Ci.nsIScriptSecurityManager);
-
-    var channel = ios.newChannel("chrome://browser/content/aboutRobots.xhtml",
-                                 null, null);
-    var principal = secMan.getCodebasePrincipal(aURI);
-
-    channel.originalURI = aURI;
-    channel.owner = principal;
-
-    return channel;
-  }
-};
-
-function NSGetModule(compMgr, fileSpec)
-  XPCOMUtils.generateModule([AboutRobots]);
--- a/browser/components/build/Makefile.in
+++ b/browser/components/build/Makefile.in
@@ -26,16 +26,17 @@ REQUIRES = \
 	intl \
 	necko \
 	shellservice \
 	xulapp \
 	places \
 	browserplaces \
 	microsummaries \
 	privatebrowsing \
+	browserabout \
 	$(NULL)
 
 EXPORTS = nsBrowserCompsCID.h
 
 CPPSRCS = nsModule.cpp \
           $(NULL)
 
 ifeq ($(OS_ARCH),WINNT)
@@ -44,26 +45,28 @@ DEFINES += -DPSTOREC_DLL=\"$(subst \,\\,
 OS_LIBS	+= $(call EXPAND_LIBNAME,ole32 shell32)
 endif
 
 LOCAL_INCLUDES = \
 	-I$(srcdir)/../shell/src \
 	-I$(srcdir)/../feeds/src \
 	-I$(srcdir)/../places/src \
 	-I$(srcdir)/../privatebrowsing/src \
+	-I$(srcdir)/../about \
 	$(NULL)
 
 ifeq ($(OS_ARCH),WINNT)
 OS_LIBS += $(call EXPAND_LIBNAME,version)
 endif
 
 SHARED_LIBRARY_LIBS = \
 	../feeds/src/$(LIB_PREFIX)browser_feeds_s.$(LIB_SUFFIX) \
 	../places/src/$(LIB_PREFIX)browserplaces_s.$(LIB_SUFFIX) \
 	../privatebrowsing/src/$(LIB_PREFIX)privatebrowsing_s.$(LIB_SUFFIX) \
+	../about/$(LIB_PREFIX)browserabout_s.$(LIB_SUFFIX) \
 	$(NULL)
 
 ifneq (,$(filter windows mac cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
 SHARED_LIBRARY_LIBS += ../shell/src/$(LIB_PREFIX)shellservice_s.$(LIB_SUFFIX)
 endif
 
 EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,unicharutil_external_s,$(LIBXUL_DIST)/lib)
 
--- a/browser/components/build/nsBrowserCompsCID.h
+++ b/browser/components/build/nsBrowserCompsCID.h
@@ -96,8 +96,13 @@
 { 0x6fb0c970, 0xe1b1, 0x11db, { 0x83, 0x14, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 } }
 
 #define NS_PLACESIMPORTEXPORTSERVICE_CONTRACTID \
   "@mozilla.org/browser/places/import-export-service;1"
 
 // 136e2c4d-c5a4-477c-b131-d93d7d704f64
 #define NS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID \
 { 0x136e2c4d, 0xc5a4, 0x477c, { 0xb1, 0x31, 0xd9, 0x3d, 0x7d, 0x70, 0x4f, 0x64 } }
+
+// 7e4bb6ad-2fc4-4dc6-89ef-23e8e5ccf980
+#define NS_BROWSER_ABOUT_REDIRECTOR_CID \
+{ 0x7e4bb6ad, 0x2fc4, 0x4dc6, { 0x89, 0xef, 0x23, 0xe8, 0xe5, 0xcc, 0xf9, 0x80 } }
+
--- a/browser/components/build/nsModule.cpp
+++ b/browser/components/build/nsModule.cpp
@@ -69,22 +69,24 @@
 #include "nsCaminoProfileMigrator.h"
 #include "nsICabProfileMigrator.h"
 #endif
 
 #endif // WINCE
 
 #include "rdf.h"
 #include "nsFeedSniffer.h"
-#include "nsAboutFeeds.h"
+#include "AboutRedirector.h"
 #include "nsIAboutModule.h"
 
 #include "nsPrivateBrowsingServiceWrapper.h"
 #include "nsNetCID.h"
 
+using namespace mozilla::browser;
+
 /////////////////////////////////////////////////////////////////////////////
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsPlacesImportExportService)
 #if defined(XP_WIN)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsShellService)
 #elif defined(XP_MACOSX)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService)
 #elif defined(MOZ_WIDGET_GTK2)
@@ -143,21 +145,52 @@ static const nsModuleComponentInfo compo
     nsPlacesImportExportServiceConstructor},
 
   { "Feed Sniffer",
     NS_FEEDSNIFFER_CID,
     NS_FEEDSNIFFER_CONTRACTID,
     nsFeedSnifferConstructor,
     nsFeedSniffer::Register },
 
-  { "about:feeds Page",
-    NS_ABOUTFEEDS_CID,
+#ifdef MOZ_SAFE_BROWSING
+  { "about:blocked",
+    NS_BROWSER_ABOUT_REDIRECTOR_CID,
+    NS_ABOUT_MODULE_CONTRACTID_PREFIX "blocked",
+    AboutRedirector::Create },
+#endif
+
+  { "about:certerror",
+    NS_BROWSER_ABOUT_REDIRECTOR_CID,
+    NS_ABOUT_MODULE_CONTRACTID_PREFIX "certerror",
+    AboutRedirector::Create },
+
+  { "about:feeds",
+    NS_BROWSER_ABOUT_REDIRECTOR_CID,
     NS_ABOUT_MODULE_CONTRACTID_PREFIX "feeds",
-    nsAboutFeeds::Create
-  },
+    AboutRedirector::Create },
+
+  { "about:privatebrowsing",
+    NS_BROWSER_ABOUT_REDIRECTOR_CID,
+    NS_ABOUT_MODULE_CONTRACTID_PREFIX "privatebrowsing",
+    AboutRedirector::Create },
+
+  { "about:rights",
+    NS_BROWSER_ABOUT_REDIRECTOR_CID,
+    NS_ABOUT_MODULE_CONTRACTID_PREFIX "rights",
+    AboutRedirector::Create },
+
+  { "about:robots",
+    NS_BROWSER_ABOUT_REDIRECTOR_CID,
+    NS_ABOUT_MODULE_CONTRACTID_PREFIX "robots",
+    AboutRedirector::Create },
+
+  { "about:sessionrestore",
+    NS_BROWSER_ABOUT_REDIRECTOR_CID,
+    NS_ABOUT_MODULE_CONTRACTID_PREFIX "sessionrestore",
+    AboutRedirector::Create },
 
 #ifndef WINCE
 
   { "Profile Migrator",
     NS_FIREFOX_PROFILEMIGRATOR_CID,
     NS_PROFILEMIGRATOR_CONTRACTID,
     nsProfileMigratorConstructor },
 
--- a/browser/components/certerror/Makefile.in
+++ b/browser/components/certerror/Makefile.in
@@ -42,14 +42,9 @@ srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 ifdef ENABLE_TESTS
 DIRS += test
 endif
 
-# EXTRA_COMPONENTS installs components written in JS to dist/bin/components
-EXTRA_PP_COMPONENTS = \
-         aboutCertError.js \
-         $(NULL)
-
 include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/browser/components/certerror/aboutCertError.js
+++ /dev/null
@@ -1,75 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla 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/MPL/
- *
- * 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 about:robots
- *
- * The Initial Developer of the Original Code is Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2008
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Ryan Flint <rflint@mozilla.com>
- *   Justin Dolske <dolske@mozilla.com>
- *   Johnathan Nightingale <johnath@mozilla.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 MPL, 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 MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-function AboutCertError() {}
-AboutCertError.prototype = {
-  classDescription: "About Cert Error",
-  contractID: "@mozilla.org/network/protocol/about;1?what=certerror",
-  classID: Components.ID("{78d2286f-de9d-47ac-9c26-e8675aedf3be}"),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
- 
-  getURIFlags: function(aURI) {
-    return (Ci.nsIAboutModule.ALLOW_SCRIPT |
-            Ci.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT);
-  },
-
-  newChannel: function(aURI) {
-    var ios = Cc["@mozilla.org/network/io-service;1"].
-              getService(Ci.nsIIOService);
-
-    var secMan = Cc["@mozilla.org/scriptsecuritymanager;1"].
-                 getService(Ci.nsIScriptSecurityManager);
-
-    var channel = ios.newChannel("chrome://browser/content/certerror/aboutCertError.xhtml",
-                                 null, null);
-    var principal = secMan.getCodebasePrincipal(aURI);
-
-    channel.originalURI = aURI;
-    channel.owner = principal;
-
-    return channel;
-  }
-};
-
-function NSGetModule(compMgr, fileSpec) {
-  return XPCOMUtils.generateModule([AboutCertError]);
-}
--- a/browser/components/feeds/src/Makefile.in
+++ b/browser/components/feeds/src/Makefile.in
@@ -55,15 +55,15 @@ DEFINES += \
 	$(NULL)
 
 EXTRA_PP_COMPONENTS = \
 	FeedConverter.js \
 	FeedWriter.js \
 	WebContentConverter.js \
 	$(NULL)
 
-REQUIRES = xpcom string necko caps js xpconnect mimetype
+REQUIRES = xpcom string necko mimetype
 
-CPPSRCS = nsFeedSniffer.cpp nsAboutFeeds.cpp
+CPPSRCS = nsFeedSniffer.cpp
 
 LOCAL_INCLUDES = -I$(srcdir)/../../build
 
 include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/browser/components/feeds/src/nsAboutFeeds.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* vim:set ts=4 sw=4 sts=4 et cindent: */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla 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/MPL/
- *
- * 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 The about:feeds Page.
- *
- * The Initial Developer of the Original Code is Google Inc.
- * Portions created by the Initial Developer are Copyright (C) 2006
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Ben Goodger <beng@google.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 MPL, 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 MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsAboutFeeds.h"
-#include "nsNetUtil.h"
-#include "nsIScriptSecurityManager.h"
-
-NS_IMPL_ISUPPORTS1(nsAboutFeeds, nsIAboutModule)
-
-#define FEEDS_PAGE_URI "chrome://browser/content/feeds/subscribe.xhtml"
-
-NS_IMETHODIMP
-nsAboutFeeds::NewChannel(nsIURI* uri, nsIChannel** result)
-{
-
-  nsresult rv;
-  nsCOMPtr<nsIIOService> ios(do_GetIOService(&rv));
-  if (NS_FAILED(rv))
-    return rv;
-
-  nsCOMPtr<nsIChannel> channel;
-  rv = ios->NewChannel(NS_LITERAL_CSTRING(FEEDS_PAGE_URI),
-                       nsnull, nsnull, getter_AddRefs(channel));
-  if (NS_FAILED(rv))
-    return rv;
-
-  channel->SetOriginalURI(uri);
-
-  nsCOMPtr<nsIScriptSecurityManager> ssm =
-    do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv);
-  if (NS_FAILED(rv))
-    return rv;
-
-  nsCOMPtr<nsIPrincipal> principal;
-  rv = ssm->GetCodebasePrincipal(uri, getter_AddRefs(principal));
-  if (NS_FAILED(rv))
-    return rv;
-
-  rv = channel->SetOwner(principal);
-  if (NS_FAILED(rv))
-    return rv;
-
-  NS_ADDREF(*result = channel);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsAboutFeeds::GetURIFlags(nsIURI* uri, PRUint32* uriFlags)
-{
-  // Feeds page needs script, and is untrusted-content-safe
-  *uriFlags = URI_SAFE_FOR_UNTRUSTED_CONTENT | ALLOW_SCRIPT;
-  return NS_OK;
-}
-
-NS_METHOD
-nsAboutFeeds::Create(nsISupports* outer, REFNSIID iid, void** result)
-{
-  nsAboutFeeds* aboutFeeds = new nsAboutFeeds();
-  if (aboutFeeds == nsnull)
-    return NS_ERROR_OUT_OF_MEMORY;
-  NS_ADDREF(aboutFeeds);
-  nsresult rv = aboutFeeds->QueryInterface(iid, result);
-  NS_RELEASE(aboutFeeds);
-  return rv;
-}
deleted file mode 100644
--- a/browser/components/feeds/src/nsAboutFeeds.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* vim:set ts=4 sw=4 sts=4 et cindent: */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla 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/MPL/
- *
- * 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 The about:feeds Page.
- *
- * The Initial Developer of the Original Code is Google Inc.
- * Portions created by the Initial Developer are Copyright (C) 2006
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Ben Goodger <beng@google.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 MPL, 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 MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-
-#ifndef nsAboutFeeds_h__
-#define nsAboutFeeds_h__
-
-#include "nsIAboutModule.h"
-
-class nsAboutFeeds : public nsIAboutModule
-{
-public:
-  NS_DECL_ISUPPORTS
-
-  NS_DECL_NSIABOUTMODULE
-
-  nsAboutFeeds() { }
-  virtual ~nsAboutFeeds() { }
-  
-  static NS_METHOD
-    Create(nsISupports* outer, REFNSIID iid, void** result);
-protected:
-};
-
-#endif // nsAboutFeeds_h__
--- a/browser/components/privatebrowsing/src/Makefile.in
+++ b/browser/components/privatebrowsing/src/Makefile.in
@@ -61,12 +61,11 @@ REQUIRES = \
 CPPSRCS = \
 	nsPrivateBrowsingServiceWrapper.cpp \
 	$(NULL)
 
 LOCAL_INCLUDES = -I$(srcdir)/../../build
 
 EXTRA_PP_COMPONENTS = \
 	nsPrivateBrowsingService.js \
-	aboutPrivateBrowsing.js \
 	$(NULL)
 
 include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/browser/components/privatebrowsing/src/aboutPrivateBrowsing.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla 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/MPL/
- *
- * 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 Private Browsing.
- *
- * The Initial Developer of the Original Code is
- * Ehsan Akhgari <ehsan.akhgari@gmail.com>
- * Portions created by the Initial Developer are Copyright (C) 2008
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * 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 MPL, 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 MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-function AboutPrivateBrowsing() { }
-AboutPrivateBrowsing.prototype = {
-  classDescription: "about:privatebrowsing",
-  contractID: "@mozilla.org/network/protocol/about;1?what=privatebrowsing",
-  classID: Components.ID("{d92a18c8-234d-49e4-9936-3b7e020c29a2}"),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
-  
-  getURIFlags: function(aURI) {
-    return Ci.nsIAboutModule.ALLOW_SCRIPT;
-  },
-  
-  newChannel: function(aURI) {
-    let ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
-    let channel = ios.newChannel("chrome://browser/content/aboutPrivateBrowsing.xhtml",
-                                 null, null);
-    channel.originalURI = aURI;
-    return channel;
-  }
-};
-
-function NSGetModule(compMgr, fileSpec)
-  XPCOMUtils.generateModule([AboutPrivateBrowsing]);
--- a/browser/components/safebrowsing/content/application.js
+++ b/browser/components/safebrowsing/content/application.js
@@ -125,47 +125,16 @@ PROT_Application.prototype.observe = fun
 /**
  * @param name String The type of url to get (either Phish or Error).
  * @return String the report phishing URL (localized).
  */
 PROT_Application.prototype.getReportURL = function(name) {
   return gDataProvider["getReport" + name + "URL"]();
 }
 
-/**
- * about:blocked implementation
- */
-PROT_Application.prototype.newChannel = function(uri) {
-  var ioService = Cc["@mozilla.org/network/io-service;1"]
-                 .getService(Ci.nsIIOService);
-  var secMan = Cc["@mozilla.org/scriptsecuritymanager;1"]
-              .getService(Ci.nsIScriptSecurityManager);
-
-  var childURI = ioService.newURI("chrome://browser/content/safebrowsing/blockedSite.xhtml",
-                                  null, null);
-  var channel = ioService.newChannelFromURI(childURI);
-  channel.originalURI = uri;
-  
-  // Drop chrome privilege
-  var principal = secMan.getCodebasePrincipal(uri);
-  channel.owner = principal;
-
-  return channel;
-}
-
-PROT_Application.prototype.getURIFlags = function(uri) {
-  // We don't particularly *want* people linking to this from
-  // untrusted content, but given that bad sites can cause this page
-  // to appear (e.g. by having an iframe pointing to known malware),
-  // we should code as though this is explicitly possible.
-  return Ci.nsIAboutModule.ALLOW_SCRIPT |
-         Ci.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT;
-}
-
 PROT_Application.prototype.QueryInterface = function(iid) {
   if (iid.equals(Ci.nsISupports) ||
       iid.equals(Ci.nsISupportsWeakReference) ||
-      iid.equals(Ci.nsIObserver) ||
-      iid.equals(Ci.nsIAboutModule))
+      iid.equals(Ci.nsIObserver))
     return this;
 
   throw Components.results.NS_ERROR_NO_INTERFACE;
 }
--- a/browser/components/safebrowsing/src/nsSafebrowsingApplication.js
+++ b/browser/components/safebrowsing/src/nsSafebrowsingApplication.js
@@ -50,23 +50,16 @@ SafebrowsingApplicationMod.prototype.reg
   }
   compMgr = compMgr.QueryInterface(Ci.nsIComponentRegistrar);
   compMgr.registerFactoryLocation(this.cid,
                                   "Safebrowsing Application Module",
                                   this.progid,
                                   fileSpec,
                                   loc,
                                   type);
-  
-  compMgr.registerFactoryLocation(this.cid,
-                                  "UrlClassifier Blocked Error Page",
-                                  "@mozilla.org/network/protocol/about;1?what=blocked",
-                                  fileSpec,
-                                  loc,
-                                  type);
 };
 
 SafebrowsingApplicationMod.prototype.getClassObject = function(compMgr, cid, iid) {  
   if (!cid.equals(this.cid))
     throw Components.results.NS_ERROR_NO_INTERFACE;
   if (!iid.equals(Ci.nsIFactory))
     throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
 
--- a/browser/components/sessionstore/src/Makefile.in
+++ b/browser/components/sessionstore/src/Makefile.in
@@ -37,12 +37,11 @@ topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 EXTRA_PP_COMPONENTS = \
 	nsSessionStore.js \
 	nsSessionStartup.js \
-	aboutSessionRestore.js \
 	$(NULL)
 
 include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/browser/components/sessionstore/src/aboutSessionRestore.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla 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/MPL/
- *
- * 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 the nsSessionStore component.
- *
- * The Initial Developer of the Original Code is
- * Simon B├╝nzli <zeniko@gmail.com>
- * Portions created by the Initial Developer are Copyright (C) 2008
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * 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 MPL, 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 MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-function AboutSessionRestore() { }
-AboutSessionRestore.prototype = {
-  classDescription: "about:sessionrestore",
-  contractID: "@mozilla.org/network/protocol/about;1?what=sessionrestore",
-  classID: Components.ID("{7c65e6f0-7605-11dd-ad8b-0800200c9a66}"),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
-  
-  getURIFlags: function(aURI) {
-    return Ci.nsIAboutModule.ALLOW_SCRIPT;
-  },
-  
-  newChannel: function(aURI) {
-    let ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
-    let channel = ios.newChannel("chrome://browser/content/aboutSessionRestore.xhtml",
-                                 null, null);
-    channel.originalURI = aURI;
-    return channel;
-  }
-};
-
-function NSGetModule(compMgr, fileSpec)
-  XPCOMUtils.generateModule([AboutSessionRestore]);
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -270,21 +270,16 @@
 @BINPATH@/components/xpconnect.xpt
 @BINPATH@/components/xpinstall.xpt
 @BINPATH@/components/xulapp.xpt
 @BINPATH@/components/xuldoc.xpt
 @BINPATH@/components/xultmpl.xpt
 @BINPATH@/components/zipwriter.xpt
 
 ; JavaScript components
-@BINPATH@/components/aboutCertError.js
-@BINPATH@/components/aboutPrivateBrowsing.js
-@BINPATH@/components/aboutRights.js
-@BINPATH@/components/aboutRobots.js
-@BINPATH@/components/aboutSessionRestore.js
 @BINPATH@/components/FeedProcessor.js
 @BINPATH@/components/FeedConverter.js
 @BINPATH@/components/FeedWriter.js
 @BINPATH@/components/fuelApplication.js
 @BINPATH@/components/WebContentConverter.js
 @BINPATH@/components/nsAddonRepository.js
 @BINPATH@/components/nsBrowserContentHandler.js
 @BINPATH@/components/nsBrowserGlue.js
--- a/browser/installer/removed-files.in
+++ b/browser/installer/removed-files.in
@@ -52,16 +52,21 @@ components/@DLL_PREFIX@xpinstall@DLL_SUF
 #ifdef XP_MACOSX
 XUL
 #else
 @DLL_PREFIX@xul@DLL_SUFFIX@
 #endif
 #endif
 @DLL_PREFIX@xpistub@DLL_SUFFIX@
 component.reg
+components/aboutCertError.js
+components/aboutPrivateBrowsing.js
+components/aboutRights.js
+components/aboutRobots.js
+components/aboutSessionRestore.js
 components/compreg.dat
 components/@DLL_PREFIX@myspell@DLL_SUFFIX@
 components/@DLL_PREFIX@spellchecker@DLL_SUFFIX@
 components/@DLL_PREFIX@spellchk@DLL_SUFFIX@
 components/xpti.dat
 components/xptitemp.dat
 components/nsBackgroundUpdateService.js
 components/nsCloseAllWindows.js