Bug 728478 Consolidate about redirectors r=IanN

This commit is contained in:
Neil Rashbrook 2012-03-04 15:10:03 +00:00
Родитель 29a47377a9
Коммит b4292c8e24
14 изменённых файлов: 34 добавлений и 468 удалений

Просмотреть файл

@ -48,7 +48,6 @@ endif
EXTRA_COMPONENTS = \
SuiteBrowser.manifest \
nsAboutRights.js \
nsBrowserContentHandler.js \
nsTypeAheadFind.js \
$(NULL)

Просмотреть файл

@ -1,5 +1,3 @@
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}

Просмотреть файл

@ -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]);

Просмотреть файл

@ -46,11 +46,6 @@ MODULE = suitecommon
EXTRA_COMPONENTS = \
nsAbout.js \
nsAboutCertError.js \
nsAboutData.js \
nsAboutLife.js \
nsAboutSessionRestore.js \
nsAboutSyncTabs.js \
nsSessionStartup.js \
nsSidebar.js \
SuiteCommon.manifest \

Просмотреть файл

@ -2,14 +2,13 @@ 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
@ -24,5 +23,3 @@ 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}

Просмотреть файл

@ -35,21 +35,44 @@
* ***** 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;
}
};

Просмотреть файл

@ -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]);

Просмотреть файл

@ -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]);

Просмотреть файл

@ -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]);

Просмотреть файл

@ -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]);

Просмотреть файл

@ -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]);

Просмотреть файл

@ -54,7 +54,6 @@ EXTRA_COMPONENTS = \
SuiteFeeds.manifest \
FeedConverter.js \
WebContentConverter.js \
nsAboutFeeds.js \
$(NULL)
EXTRA_PP_COMPONENTS = \

Просмотреть файл

@ -14,5 +14,3 @@ category JavaScript-global-constructor BrowserFeedWriter @mozilla.org/browser/fe
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}

Просмотреть файл

@ -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]);