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
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 12:26:25 +0200
commit73289f53892c4c48eedf8de5a40af74ff9b55a09 (patch)
treec3991d265b47fad7c75cf45812ac1963103ccf7b /toolkit/modules/ResetProfile.jsm
parent4acc0d58cb0fa989d609972493be363c105f2594 (diff)
downloadUXP-73289f53892c4c48eedf8de5a40af74ff9b55a09.tar
UXP-73289f53892c4c48eedf8de5a40af74ff9b55a09.tar.gz
UXP-73289f53892c4c48eedf8de5a40af74ff9b55a09.tar.lz
UXP-73289f53892c4c48eedf8de5a40af74ff9b55a09.tar.xz
UXP-73289f53892c4c48eedf8de5a40af74ff9b55a09.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 = {
/**