Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: mobile/android/components/AboutRedirector.js

Issue 5396553988571136: Issue 2531 - Remove Mozilla-specific about pages (Closed)
Patch Set: Created May 15, 2015, 2:05 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « docshell/base/nsAboutRedirector.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* This Source Code Form is subject to the terms of the Mozilla Public 1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 const Cc = Components.classes; 4 const Cc = Components.classes;
5 const Ci = Components.interfaces; 5 const Ci = Components.interfaces;
6 6
7 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); 7 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
8 8
9 let modules = { 9 let modules = {
10 // about: 10 // about:
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 }, 85 },
86 #endif 86 #endif
87 #ifdef NIGHTLY_BUILD 87 #ifdef NIGHTLY_BUILD
88 passwords: { 88 passwords: {
89 uri: "chrome://browser/content/aboutPasswords.xhtml", 89 uri: "chrome://browser/content/aboutPasswords.xhtml",
90 privileged: true 90 privileged: true
91 } 91 }
92 #endif 92 #endif
93 } 93 }
94 94
95 // Removing some about pages as part of
96 // https://issues.adblockplus.org/ticket/2531
97 for (let moduleName of ["firefox", "fennec", "rights", "apps", "feedback"])
René Jeschke 2015/05/18 11:36:52 Are you sure, that the application only links to '
98 delete modules[moduleName];
99
95 function AboutRedirector() {} 100 function AboutRedirector() {}
96 AboutRedirector.prototype = { 101 AboutRedirector.prototype = {
97 QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]), 102 QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
98 classID: Components.ID("{322ba47e-7047-4f71-aebf-cb7d69325cd9}"), 103 classID: Components.ID("{322ba47e-7047-4f71-aebf-cb7d69325cd9}"),
99 104
100 _getModuleInfo: function (aURI) { 105 _getModuleInfo: function (aURI) {
101 let moduleName = aURI.path.replace(/[?#].*/, "").toLowerCase(); 106 let moduleName = aURI.path.replace(/[?#].*/, "").toLowerCase();
102 return modules[moduleName]; 107 return modules[moduleName];
103 }, 108 },
104 109
(...skipping 25 matching lines...) Expand all
130 } 135 }
131 136
132 channel.originalURI = aURI; 137 channel.originalURI = aURI;
133 138
134 return channel; 139 return channel;
135 } 140 }
136 }; 141 };
137 142
138 const components = [AboutRedirector]; 143 const components = [AboutRedirector];
139 this.NSGetFactory = XPCOMUtils.generateNSGetFactory(components); 144 this.NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
OLDNEW
« no previous file with comments | « docshell/base/nsAboutRedirector.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld