Bug 728478 Consolidate about redirectors r=IanN
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Sun, 04 Mar 2012 15:10:03 +0000
changeset 10995 6bc285618138a22c173dad4acaeee876f1eba76a
parent 10994 6a8d412018becb8a58e998cf8df5d0daa6ed42e2
child 10996 5cb1917f9106932c8fa2e41c98f9af150bd51383
push id463
push userbugzilla@standard8.plus.com
push dateTue, 24 Apr 2012 17:34:51 +0000
treeherdercomm-beta@e53588e8f7b0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN
bugs728478
Bug 728478 Consolidate about redirectors r=IanN
suite/browser/Makefile.in
suite/browser/SuiteBrowser.manifest
suite/browser/nsAboutRights.js
suite/common/src/Makefile.in
suite/common/src/SuiteCommon.manifest
suite/common/src/nsAbout.js
suite/common/src/nsAboutCertError.js
suite/common/src/nsAboutData.js
suite/common/src/nsAboutLife.js
suite/common/src/nsAboutSessionRestore.js
suite/common/src/nsAboutSyncTabs.js
suite/feeds/src/Makefile.in
suite/feeds/src/SuiteFeeds.manifest
suite/feeds/src/nsAboutFeeds.js
--- a/suite/browser/Makefile.in
+++ b/suite/browser/Makefile.in
@@ -43,17 +43,16 @@ VPATH		= @srcdir@
 include $(DEPTH)/config/autoconf.mk
 
 ifdef ENABLE_TESTS
 PARALLEL_DIRS += test
 endif
 
 EXTRA_COMPONENTS = \
 	SuiteBrowser.manifest \
-	nsAboutRights.js \
 	nsBrowserContentHandler.js \
 	nsTypeAheadFind.js \
 	$(NULL)
 
 PREF_JS_EXPORTS = $(srcdir)/browser-prefs.js \
 		  $(srcdir)/channel-prefs.js \
 		  $(NULL)
 
--- a/suite/browser/SuiteBrowser.manifest
+++ b/suite/browser/SuiteBrowser.manifest
@@ -1,10 +1,8 @@
-component {89e9da80-4c03-46a0-a357-cf77bbef98b9} nsAboutRights.js
-contract @mozilla.org/network/protocol/about;1?what=rights {89e9da80-4c03-46a0-a357-cf77bbef98b9}
 component {c2343730-dc2c-11d3-98b3-001083010e9b} nsBrowserContentHandler.js
 contract @mozilla.org/uriloader/content-handler;1?type=text/html {c2343730-dc2c-11d3-98b3-001083010e9b}
 contract @mozilla.org/uriloader/content-handler;1?type=application/vnd.mozilla.xul+xml {c2343730-dc2c-11d3-98b3-001083010e9b}
 contract @mozilla.org/uriloader/content-handler;1?type=image/svg+xml {c2343730-dc2c-11d3-98b3-001083010e9b}
 contract @mozilla.org/uriloader/content-handler;1?type=text/rdf {c2343730-dc2c-11d3-98b3-001083010e9b}
 contract @mozilla.org/uriloader/content-handler;1?type=text/xml {c2343730-dc2c-11d3-98b3-001083010e9b}
 contract @mozilla.org/uriloader/content-handler;1?type=application/xhtml+xml {c2343730-dc2c-11d3-98b3-001083010e9b}
 contract @mozilla.org/uriloader/content-handler;1?type=text/css {c2343730-dc2c-11d3-98b3-001083010e9b}
deleted file mode 100644
--- a/suite/browser/nsAboutRights.js
+++ /dev/null
@@ -1,68 +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 ***** */
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-function AboutRights() {}
-AboutRights.prototype = {
-  classID: Components.ID("{89e9da80-4c03-46a0-a357-cf77bbef98b9}"),
-  QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIAboutModule]),
-  getURIFlags: function(aURI) {
-    return (Components.interfaces.nsIAboutModule.ALLOW_SCRIPT |
-            Components.interfaces.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT);
-  },
-
-  newChannel: function(aURI) {
-    var ios = Components.classes["@mozilla.org/network/io-service;1"]
-                        .getService(Components.interfaces.nsIIOService);
-
-    var secMan = Components.classes["@mozilla.org/scriptsecuritymanager;1"]
-                           .getService(Components.interfaces.nsIScriptSecurityManager);
-
-    var channel = ios.newChannel("chrome://branding/content/aboutRights.xhtml",
-                                 null, null);
-    var principal = secMan.getCodebasePrincipal(aURI);
-
-    channel.originalURI = aURI;
-    channel.owner = principal;
-
-    return channel;
-  }
-};
-
-var NSGetFactory = XPCOMUtils.generateNSGetFactory([AboutRights]);
-
--- a/suite/common/src/Makefile.in
+++ b/suite/common/src/Makefile.in
@@ -41,21 +41,16 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= suitecommon
 
 EXTRA_COMPONENTS = \
 	nsAbout.js \
-	nsAboutCertError.js \
-	nsAboutData.js \
-	nsAboutLife.js \
-	nsAboutSessionRestore.js \
-	nsAboutSyncTabs.js \
 	nsSessionStartup.js \
 	nsSidebar.js \
 	SuiteCommon.manifest \
 	nsSuiteDownloadManagerUI.js \
 	nsSuiteGlue.js \
 	$(NULL)
 
 EXTRA_PP_COMPONENTS = \
--- a/suite/common/src/SuiteCommon.manifest
+++ b/suite/common/src/SuiteCommon.manifest
@@ -1,28 +1,25 @@
 component {08bbb4af-7bff-4b16-8ff7-d62f3ec5aa0c} nsSuiteDownloadManagerUI.js
 contract @mozilla.org/download-manager-ui;1 {08bbb4af-7bff-4b16-8ff7-d62f3ec5aa0c}
 component {d54f2c89-8fd6-4eeb-a7a4-51d4dcdf460f} nsAbout.js
 contract @mozilla.org/network/protocol/about;1?what= {d54f2c89-8fd6-4eeb-a7a4-51d4dcdf460f}
-component {b24861fb-e91a-40dd-886d-68d26a9586c7} nsAboutCertError.js
-contract @mozilla.org/network/protocol/about;1?what=certerror {b24861fb-e91a-40dd-886d-68d26a9586c7}
-component {7a02e7fe-b32c-40ea-a790-246ca49b6061} nsAboutData.js
-contract @mozilla.org/network/protocol/about;1?what=data {7a02e7fe-b32c-40ea-a790-246ca49b6061}
-component {3d19bdd7-2200-4724-9c97-31797d4c9269} nsAboutLife.js
-contract @mozilla.org/network/protocol/about;1?what=life {3d19bdd7-2200-4724-9c97-31797d4c9269}
-component {a03c813e-abe8-41de-8d0c-5aa85f877696} nsAboutSessionRestore.js
-contract @mozilla.org/network/protocol/about;1?what=sessionrestore {a03c813e-abe8-41de-8d0c-5aa85f877696}
+contract @mozilla.org/network/protocol/about;1?what=certerror {d54f2c89-8fd6-4eeb-a7a4-51d4dcdf460f}
+contract @mozilla.org/network/protocol/about;1?what=data {d54f2c89-8fd6-4eeb-a7a4-51d4dcdf460f}
+contract @mozilla.org/network/protocol/about;1?what=feeds {d54f2c89-8fd6-4eeb-a7a4-51d4dcdf460f}
+contract @mozilla.org/network/protocol/about;1?what=life {d54f2c89-8fd6-4eeb-a7a4-51d4dcdf460f}
+contract @mozilla.org/network/protocol/about;1?what=rights {d54f2c89-8fd6-4eeb-a7a4-51d4dcdf460f}
+contract @mozilla.org/network/protocol/about;1?what=sessionrestore {d54f2c89-8fd6-4eeb-a7a4-51d4dcdf460f}
+contract @mozilla.org/network/protocol/about;1?what=sync-tabs {d54f2c89-8fd6-4eeb-a7a4-51d4dcdf460f}
 component {4e6c1112-57b6-44ba-adf9-99fb573b0a30} nsSessionStartup.js
 contract @mozilla.org/suite/sessionstartup;1 {4e6c1112-57b6-44ba-adf9-99fb573b0a30}
 category app-startup SessionStartup service,@mozilla.org/suite/sessionstartup;1
 component {d37ccdf1-496f-4135-9575-037180af010d} nsSessionStore.js
 contract @mozilla.org/suite/sessionstore;1 {d37ccdf1-496f-4135-9575-037180af010d}
 component {bbbbe845-5a1b-40ee-813c-f84b8faaa07c} nsSuiteGlue.js
 contract @mozilla.org/suite/suiteglue;1 {bbbbe845-5a1b-40ee-813c-f84b8faaa07c}
 category app-startup nsSuiteGlue service,@mozilla.org/suite/suiteglue;1
 component {9d4c845d-3f09-402a-b66d-50f291d7d50f} nsSuiteGlue.js
 contract @mozilla.org/content-permission/prompt;1 {9d4c845d-3f09-402a-b66d-50f291d7d50f}
 component {22117140-9c6e-11d3-aaf1-00805f8a4905} nsSidebar.js
 contract @mozilla.org/sidebar;1 {22117140-9c6e-11d3-aaf1-00805f8a4905}
 category JavaScript-global-property sidebar @mozilla.org/sidebar;1
 category JavaScript-global-property external @mozilla.org/sidebar;1
-component {145dc3f6-f44a-4517-806a-9bec989400b4} nsAboutSyncTabs.js
-contract @mozilla.org/network/protocol/about;1?what=sync-tabs {145dc3f6-f44a-4517-806a-9bec989400b4}
--- a/suite/common/src/nsAbout.js
+++ b/suite/common/src/nsAbout.js
@@ -30,28 +30,51 @@
  * 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 ***** */
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+Components.utils.import("resource://gre/modules/Services.jsm");
+
+const SCRIPT = Components.interfaces.nsIAboutModule.ALLOW_SCRIPT;
+const UNTRUSTED = Components.interfaces.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT;
+const HIDE = Components.interfaces.nsIAboutModule.HIDE_FROM_ABOUTABOUT;
 
 function About() { }
 About.prototype = {
+  Flags: SCRIPT,
+  URI: "chrome://communicator/content/about.xhtml",
+  certerrorFlags: SCRIPT | UNTRUSTED | HIDE,
+  certerrorURI: "chrome://communicator/content/certError.xhtml",
+  dataFlags: SCRIPT,
+  dataURI: "chrome://communicator/content/dataman/dataman.xul",
+  feedsFlags: SCRIPT | UNTRUSTED | HIDE,
+  feedsURI: "chrome://communicator/content/feeds/subscribe.xhtml",
+  lifeFlags: SCRIPT | HIDE,
+  lifeURI: "chrome://communicator/content/aboutLife.xhtml",
+  rightsFlags: SCRIPT | UNTRUSTED,
+  rightsURI: "chrome://branding/content/aboutRights.xhtml",
+  sessionrestoreFlags: SCRIPT | HIDE,
+  sessionrestoreURI: "chrome://communicator/content/aboutSessionRestore.xhtml",
+  synctabsFlags: SCRIPT,
+  synctabsURI: "chrome://communicator/content/aboutSyncTabs.xul",
+
   classID: Components.ID("{d54f2c89-8fd6-4eeb-a7a4-51d4dcdf460f}"),
   QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIAboutModule]),
 
   getURIFlags: function(aURI) {
-    return Components.interfaces.nsIAboutModule.ALLOW_SCRIPT;
+    return this[aURI.path.replace(/-|\W.*$/g, "").toLowerCase() + "Flags"];
   },
 
   newChannel: function(aURI) {
-    let ios = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
-    let channel = ios.newChannel("chrome://communicator/content/about.xhtml",
-                                 null, null);
+    var module = aURI.path.replace(/-|\W.*$/g, "").toLowerCase();
+    var channel = Services.io.newChannel(this[module + "URI"], null, null);
     channel.originalURI = aURI;
+    if (this[module + "Flags"] & UNTRUSTED)
+      channel.owner = Services.scriptSecurityManager.getCodebasePrincipal(aURI);
     return channel;
   }
 };
 
 var NSGetFactory = XPCOMUtils.generateNSGetFactory([About]);
deleted file mode 100644
--- a/suite/common/src/nsAboutCertError.js
+++ /dev/null
@@ -1,69 +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 ***** */
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-function AboutCertError() {}
-AboutCertError.prototype = {
-  classID: Components.ID("{b24861fb-e91a-40dd-886d-68d26a9586c7}"),
-  QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIAboutModule]),
-
-  getURIFlags: function(aURI) {
-    return (Components.interfaces.nsIAboutModule.ALLOW_SCRIPT |
-            Components.interfaces.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT |
-            Components.interfaces.nsIAboutModule.HIDE_FROM_ABOUTABOUT);
-  },
-
-  newChannel: function(aURI) {
-    var ios = Components.classes["@mozilla.org/network/io-service;1"].
-              getService(Components.interfaces.nsIIOService);
-
-    var secMan = Components.classes["@mozilla.org/scriptsecuritymanager;1"].
-                 getService(Components.interfaces.nsIScriptSecurityManager);
-
-    var channel = ios.newChannel("chrome://communicator/content/certError.xhtml",
-                                 null, null);
-    var principal = secMan.getCodebasePrincipal(aURI);
-
-    channel.originalURI = aURI;
-    channel.owner = principal;
-
-    return channel;
-  }
-};
-
-var NSGetFactory = XPCOMUtils.generateNSGetFactory([AboutCertError]);
deleted file mode 100644
--- a/suite/common/src/nsAboutData.js
+++ /dev/null
@@ -1,58 +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 KaiRo's data manager.
- *
- * The Initial Developer of the Original Code is
- * Robert Kaiser <kairo@kairo.at>.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *  Robert Kaiser <kairo@kairo.at> (original author)
- *
- * 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 ***** */
-
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-function AboutData() { }
-AboutData.prototype = {
-  classID: Components.ID("{7a02e7fe-b32c-40ea-a790-246ca49b6061}"),
-  QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIAboutModule]),
-
-  getURIFlags: function(aURI) {
-    return Components.interfaces.nsIAboutModule.ALLOW_SCRIPT;
-  },
-
-  newChannel: function(aURI) {
-    let channel = Services.io.newChannel("chrome://communicator/content/dataman/dataman.xul",
-                                         null, null);
-    channel.originalURI = aURI;
-    return channel;
-  }
-};
-
-var NSGetFactory = XPCOMUtils.generateNSGetFactory([AboutData]);
deleted file mode 100644
--- a/suite/common/src/nsAboutLife.js
+++ /dev/null
@@ -1,58 +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 ***** */
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-function AboutLife() { }
-AboutLife.prototype = {
-  classID: Components.ID("{3d19bdd7-2200-4724-9c97-31797d4c9269}"),
-  QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIAboutModule]),
-
-  getURIFlags: function(aURI) {
-    return (Components.interfaces.nsIAboutModule.ALLOW_SCRIPT |
-            Components.interfaces.nsIAboutModule.HIDE_FROM_ABOUTABOUT);
-  },
-
-  newChannel: function(aURI) {
-    let ios = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
-    let channel = ios.newChannel("chrome://communicator/content/aboutLife.xhtml",
-                                 null, null);
-    channel.originalURI = aURI;
-    return channel;
-  }
-};
-
-var NSGetFactory = XPCOMUtils.generateNSGetFactory([AboutLife]);
deleted file mode 100644
--- a/suite/common/src/nsAboutSessionRestore.js
+++ /dev/null
@@ -1,57 +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 ***** */
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-function AboutSessionRestore() { }
-AboutSessionRestore.prototype = {
-  classID: Components.ID("{a03c813e-abe8-41de-8d0c-5aa85f877696}"),
-  QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIAboutModule]),
-
-  getURIFlags: function(aURI) {
-    return Components.interfaces.nsIAboutModule.ALLOW_SCRIPT;
-  },
-
-  newChannel: function(aURI) {
-    let ios = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
-    let channel = ios.newChannel("chrome://communicator/content/aboutSessionRestore.xhtml",
-                                 null, null);
-    channel.originalURI = aURI;
-    return channel;
-  }
-};
-
-var NSGetFactory = XPCOMUtils.generateNSGetFactory([AboutSessionRestore]);
deleted file mode 100644
--- a/suite/common/src/nsAboutSyncTabs.js
+++ /dev/null
@@ -1,58 +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 Sync component.
- *
- * The Initial Developer of the Original Code is
- * Jens Hatlak <jh@junetz.de>
- * 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 ***** */
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-function AboutSyncTabs() { }
-AboutSyncTabs.prototype = {
-  classID: Components.ID("{145dc3f6-f44a-4517-806a-9bec989400b4}"),
-  QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIAboutModule]),
-
-  getURIFlags: function(aURI) {
-    return Components.interfaces.nsIAboutModule.ALLOW_SCRIPT;
-  },
-
-  newChannel: function(aURI) {
-    let ios = Components.classes["@mozilla.org/network/io-service;1"]
-                        .getService(Components.interfaces.nsIIOService);
-    let channel = ios.newChannel("chrome://communicator/content/aboutSyncTabs.xul",
-                                 null, null);
-    channel.originalURI = aURI;
-    return channel;
-  }
-};
-
-var NSGetFactory = XPCOMUtils.generateNSGetFactory([AboutSyncTabs]);
--- a/suite/feeds/src/Makefile.in
+++ b/suite/feeds/src/Makefile.in
@@ -49,17 +49,16 @@ DEFINES += \
 	-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
 	-DMOZ_MACBUNDLE_NAME=$(MOZ_MACBUNDLE_NAME) \
 	$(NULL)
 
 EXTRA_COMPONENTS = \
 	SuiteFeeds.manifest \
 	FeedConverter.js \
 	WebContentConverter.js \
-	nsAboutFeeds.js \
 	$(NULL)
 
 EXTRA_PP_COMPONENTS = \
 	FeedWriter.js \
 	$(NULL)
 
 CPPSRCS = \
 	nsFeedSniffer.cpp \
--- a/suite/feeds/src/SuiteFeeds.manifest
+++ b/suite/feeds/src/SuiteFeeds.manifest
@@ -9,10 +9,8 @@ contract @mozilla.org/network/protocol;1
 component {f0ff0fe4-1713-4D34-9323-3f5deb6a6a60} FeedConverter.js
 contract @mozilla.org/network/protocol;1?name=pcast {f0ff0fe4-1713-4D34-9323-3f5deb6a6a60}
 component {49bb6593-3aff-4eb3-a068-2712c28bd58e} FeedWriter.js
 contract @mozilla.org/browser/feeds/result-writer;1 {49bb6593-3aff-4eb3-a068-2712c28bd58e}
 category JavaScript-global-constructor BrowserFeedWriter @mozilla.org/browser/feeds/result-writer;1
 component {792a7e82-06a0-437c-af63-b2d12e808acc} WebContentConverter.js
 contract @mozilla.org/embeddor.implemented/web-content-handler-registrar;1 {792a7e82-06a0-437c-af63-b2d12e808acc}
 category app-startup WebContentConverter service,@mozilla.org/embeddor.implemented/web-content-handler-registrar;1
-component {f3487aac-65a0-4101-88a4-f7450c231351} nsAboutFeeds.js
-contract @mozilla.org/network/protocol/about;1?what=feeds {f3487aac-65a0-4101-88a4-f7450c231351}
deleted file mode 100644
--- a/suite/feeds/src/nsAboutFeeds.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 the SeaMonkey internet suite code.
- *
- * The Initial Developer of the Original Code is
- * Caio Tiago Oliveira <asrail@gmail.com>
- *
- * Portions created by the Initial Developer are Copyright (C) 2009
- * 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 ABOUTFEEDS_URI = "chrome://communicator/content/feeds/subscribe.xhtml";
-const ABOUTFEEDS_CLASSID = Components.ID("{f3487aac-65a0-4101-88a4-f7450c231351}");
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-function AboutFeeds() {
-}
-
-AboutFeeds.prototype = {
-  classID: ABOUTFEEDS_CLASSID,
-  implementationLanguage: Components.interfaces.nsIProgrammingLanguage.JAVASCRIPT,
-  QueryInterface: XPCOMUtils.generateQI(
-    [Components.interfaces.nsIAboutModule,
-    Components.interfaces.nsISupports]),
-
-  newChannel: function(aURI) {
-    var ios = Components.classes["@mozilla.org/network/io-service;1"]
-                        .getService(Components.interfaces.nsIIOService);
-    var secMan = Components.classes["@mozilla.org/scriptsecuritymanager;1"]
-                           .getService(Components.interfaces.nsIScriptSecurityManager);
-    var channel = ios.newChannel(ABOUTFEEDS_URI, null, null);
-    var principal = secMan.getCodebasePrincipal(aURI);
-
-    channel.originalURI = aURI;
-    channel.owner = principal;
-
-    return channel;
-  },
-
-  getURIFlags: function() {
-    return Components.interfaces.nsIAboutModule.ALLOW_SCRIPT |
-           Components.interfaces.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT |
-           Components.interfaces.nsIAboutModule.HIDE_FROM_ABOUTABOUT;
-  },
-
-};
-
-var NSGetFactory = XPCOMUtils.generateNSGetFactory([AboutFeeds]);