Bug 966014 - Show Australis tour page upon update for en-US on Aurora. r=gavin, a=gavin
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Tue, 04 Feb 2014 10:15:52 -0800
changeset 182650 2b530ad1d7e70984c34a87f967ae171c0e9f0c5a
parent 182649 602d894f6c73a4da22e8d49209029981b8d69fea
child 182651 9bb3f06babe519983605ffb6de4ba31e69e1a706
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin, gavin
bugs966014
milestone29.0a2
Bug 966014 - Show Australis tour page upon update for en-US on Aurora. r=gavin, a=gavin
browser/components/nsBrowserContentHandler.js
--- a/browser/components/nsBrowserContentHandler.js
+++ b/browser/components/nsBrowserContentHandler.js
@@ -584,16 +584,32 @@ nsBrowserContentHandler.prototype = {
             // into account because that requires waiting for the session file
             // to be read. If a crash occurs after updating, before restarting,
             // we may open the startPage in addition to restoring the session.
             var ss = Components.classes["@mozilla.org/browser/sessionstartup;1"]
                                .getService(Components.interfaces.nsISessionStartup);
             willRestoreSession = ss.isAutomaticRestoreEnabled();
 
             overridePage = Services.urlFormatter.formatURLPref("startup.homepage_override_url");
+
+#if MOZ_UPDATE_CHANNEL == aurora
+            // Temporary Australis whatsnew page for Aurora (bug 966014)
+            if (Services.appinfo.OS == "Darwin" || Services.appinfo.OS == "WINNT") {
+              let locale = "en-US";
+              try {
+                locale = Services.prefs.getCharPref("general.useragent.locale");
+              } catch (e) {}
+
+              if (locale == "en-US") {
+                let url = "https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/whatsnew/?oldversion=%OLD_VERSION%";
+                overridePage = Services.urlFormatter.formatURL(url);
+              }
+            }
+#endif
+
             if (prefb.prefHasUserValue("app.update.postupdate"))
               overridePage = getPostUpdateOverridePage(overridePage);
 
             overridePage = overridePage.replace("%OLD_VERSION%", old_mstone);
             break;
         }
       }
     } catch (ex) {}