summaryrefslogtreecommitdiffstats
path: root/toolkit/modules/ResetProfile.jsm
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-02 04:25:47 -0500
committerMatt A. Tobin <email@mattatobin.com>2020-02-02 04:25:47 -0500
commit6a3907dae474c7e1f31df13a26605278d3500a0d (patch)
treeea2edc8f5df02710226259f57ea412789d979dac /toolkit/modules/ResetProfile.jsm
parent7d21d02d532fed5613501de63f8b3d50144a751f (diff)
downloadUXP-6a3907dae474c7e1f31df13a26605278d3500a0d.tar
UXP-6a3907dae474c7e1f31df13a26605278d3500a0d.tar.gz
UXP-6a3907dae474c7e1f31df13a26605278d3500a0d.tar.lz
UXP-6a3907dae474c7e1f31df13a26605278d3500a0d.tar.xz
UXP-6a3907dae474c7e1f31df13a26605278d3500a0d.zip
Issue #65 - Remove AppConstants from toolkit/modules
Except for secondscreen
Diffstat (limited to 'toolkit/modules/ResetProfile.jsm')
-rw-r--r--toolkit/modules/ResetProfile.jsm21
1 files changed, 14 insertions, 7 deletions
diff --git a/toolkit/modules/ResetProfile.jsm b/toolkit/modules/ResetProfile.jsm
index c1839af4f..25ab8b966 100644
--- a/toolkit/modules/ResetProfile.jsm
+++ b/toolkit/modules/ResetProfile.jsm
@@ -9,14 +9,21 @@ this.EXPORTED_SYMBOLS = ["ResetProfile"];
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/AppConstants.jsm");
-// For Basilisk and Pale Moon
-// Hard-code MOZ_APP_NAME to firefox because of hard-coded type in migrator.
-const MOZ_APP_NAME = (((AppConstants.MOZ_APP_NAME == "basilisk")
- || (AppConstants.MOZ_APP_NAME == "palemoon"))
- ? "firefox" : AppConstants.MOZ_APP_NAME);
-const MOZ_BUILD_APP = AppConstants.MOZ_BUILD_APP;
+// We need to tell the migrator that many different applications are Mozilla applications
+#ifdef MOZ_PHOENIX
+const MOZ_APP_NAME = "firefox";
+const MOZ_BUILD_APP = "browser";
+#elifdef MOZ_THUNDERBIRD
+const MOZ_APP_NAME = "thunderbird";
+const MOZ_BUILD_APP = "mail";
+#elif defined(MOZ_SUITE) && !defined(BINOC_BOREALIS)
+const MOZ_APP_NAME = "seamonkey";
+const MOZ_BUILD_APP = "suite";
+#else
+#expand const MOZ_APP_NAME = "__MOZ_APP_NAME__";
+#expand const MOZ_BUILD_APP = "__MOZ_BUILD_APP__".match(/([^\/]*)\/*$/)[1];
+#endif
this.ResetProfile = {
/**