en we scan the directories.
// If a build allows sideloading, or we're in automation, we'll also allow use of the preference.
if (AppConstants.MOZ_ALLOW_ADDON_SIDELOAD || Cu.isInAutomation) {
  XPCOMUtils.defineLazyPreferenceGetter(
    AddonSettings,
    "SCOPES_SIDELOAD",
    PREF_EM_SIDELOAD_SCOPES,
    AppConstants.MOZ_ALLOW_ADDON_SIDELOAD
      ? AddonManager.SCOPE_ALL
      : AddonManager.SCOPE_PROFILE
  );
} else {
  makeConstant("SCOPES_SIDELOAD", AddonManager.SCOPE_PROFILE);
}
PK