From 73289f53892c4c48eedf8de5a40af74ff9b55a09 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Sun, 2 Feb 2020 04:25:47 -0500 Subject: Issue #65 - Remove AppConstants from toolkit/modules Except for secondscreen --- toolkit/modules/ResetProfile.jsm | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'toolkit/modules/ResetProfile.jsm') 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 = { /** -- cgit v1.2.3