Bug 517521: add about:firefox alias for about:fennec page, r=mfinkle
authorGavin Sharp <gavin@mozilla.com>
Fri, 18 Sep 2009 16:37:58 -0400
changeset 65577 c05dd0e245a750495777c3c24908ed5784ab19de
parent 65576 27be610d71c4f8fe77070b1bb76b80213059baf2
child 65578 73413e896bbcd06385f8c3ca001df7fe3fa12141
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs517521
Bug 517521: add about:firefox alias for about:fennec page, r=mfinkle
mobile/chrome/content/browser.xul
mobile/components/AboutRedirector.js
--- a/mobile/chrome/content/browser.xul
+++ b/mobile/chrome/content/browser.xul
@@ -346,17 +346,24 @@
 
         <vbox id="prefs-container" flex="1">
           <hbox id="prefs-header" class="panel-header">
             <label value="&prefsHeader.label;"/>
           </hbox>
           <richlistbox id="prefs-list" seltype="single" flex="1">
             <setting title="&about.title;" type="control">
               &about.description;
-              <button id="prefs-about-button" label="&about.button;" oncommand="Browser.addTab('about:fennec', true);"/>
+              <button id="prefs-about-button" label="&about.button;"
+#ifdef MOZ_OFFICIAL_BRANDING
+# these two point to the same page, this just matters for what shows up in the
+# URL bar
+                      oncommand="Browser.addTab('about:firefox', true);"/>
+#else
+                      oncommand="Browser.addTab('about:fennec', true);"/>
+#endif
             </setting>
             <settings id="prefs-content" label="&content.title;">
               <setting pref="permissions.default.image" title="&showImages.title;" type="boolint" on="1" off="2"/>
               <setting pref="javascript.enabled" type="bool" title="&enableJavaScript.title;">
                 &enableJavaScript.description;
               </setting>
               <setting pref="plugins.enabled" type="bool" title="&enablePlugins.title;" onsynctopreference="Browser.setPluginState(this.value);">
                 &enablePlugins.description;
--- a/mobile/components/AboutRedirector.js
+++ b/mobile/components/AboutRedirector.js
@@ -40,16 +40,19 @@ const Ci = Components.interfaces;
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 let modules = {
   fennec: {
     uri: "chrome://browser/content/about.xhtml",
     privileged: true
   },
+  // about:firefox is an alias for about:fennec
+  get firefox() this.fennec,
+
   firstrun: {
     uri: "chrome://firstrun/content/firstrun.html",
     privileged: false
   },
   rights: {
 #ifdef MOZ_OFFICIAL_BRANDING
     uri: "chrome://global/content/aboutRights.xhtml",
 #else
@@ -109,16 +112,24 @@ AboutFirstrun.prototype = {
 function AboutFennec() {}
 AboutFennec.prototype = {
   __proto__: AboutGeneric.prototype,
   classDescription: "About Fennec",
   contractID: "@mozilla.org/network/protocol/about;1?what=fennec",
   classID: Components.ID("{842a6d11-b369-4610-ba66-c3b5217e82be}")
 }
 
+function AboutFirefox() {}
+AboutFirefox.prototype = {
+  __proto__: AboutGeneric.prototype,
+  classDescription: "About Firefox",
+  contractID: "@mozilla.org/network/protocol/about;1?what=firefox",
+  classID: Components.ID("{dd40c467-d206-4f22-9215-8fcc74c74e38}")  
+}
+
 function AboutRights() {}
 AboutRights.prototype = {
   __proto__: AboutGeneric.prototype,
   classDescription: "About Rights",
   contractID: "@mozilla.org/network/protocol/about;1?what=rights",
   classID: Components.ID("{3b988fbf-ec97-4e1c-a5e4-573d999edc9c}")
 }
 
@@ -126,9 +137,10 @@ function AboutCertError() {}
 AboutCertError.prototype = {
   __proto__: AboutGeneric.prototype,
   classDescription: "About Certificate Error",
   contractID: "@mozilla.org/network/protocol/about;1?what=certerror",
   classID: Components.ID("{972efe64-8ac0-4e91-bdb0-22835d987815}")
 }
 
 function NSGetModule(compMgr, fileSpec)
-  XPCOMUtils.generateModule([AboutFirstrun, AboutFennec, AboutRights, AboutCertError]);
+  XPCOMUtils.generateModule([AboutFirstrun, AboutFennec, AboutRights,
+                             AboutCertError, AboutFirefox]);