Bug 1314237 - detect nightly/devedition as 'firefox' in migration code, r=mikedeboer
MozReview-Commit-ID: 6vQa59i81Gb
--- a/browser/components/migration/MigrationUtils.jsm
+++ b/browser/components/migration/MigrationUtils.jsm
@@ -669,30 +669,35 @@ this.MigrationUtils = Object.freeze({
*/
getMigratorKeyForDefaultBrowser() {
// Canary uses the same description as Chrome so we can't distinguish them.
const APP_DESC_TO_KEY = {
"Internet Explorer": "ie",
"Microsoft Edge": "edge",
"Safari": "safari",
"Firefox": "firefox",
+ "Nightly": "firefox",
"Google Chrome": "chrome", // Windows, Linux
"Chrome": "chrome", // OS X
"Chromium": "chromium", // Windows, OS X
"Chromium Web Browser": "chromium", // Linux
"360\u5b89\u5168\u6d4f\u89c8\u5668": "360se",
};
let key = "";
try {
let browserDesc =
Cc["@mozilla.org/uriloader/external-protocol-service;1"]
.getService(Ci.nsIExternalProtocolService)
.getApplicationDescription("http");
key = APP_DESC_TO_KEY[browserDesc] || "";
+ // Handle devedition, as well as "FirefoxNightly" on OS X.
+ if (!key && browserDesc.startsWith("Firefox")) {
+ key = "firefox";
+ }
}
catch (ex) {
Cu.reportError("Could not detect default browser: " + ex);
}
// "firefox" is the least useful entry here, and might just be because we've set
// ourselves as the default (on Windows 7 and below). In that case, check if we
// have a registry key that tells us where to go: