commit a048ac691af900a648464ff6a95c715ed21eb3a1
parent 6c181ef9196cf51e1e7a819eed26fdbaf48e9120
Author: Harsheet <hsohaney@mozilla.com>
Date: Wed, 15 Oct 2025 13:35:21 +0000
Bug 1994270 - Add a pref to detect if a user manually disabled backup. r=fchasen
Differential Revision: https://phabricator.services.mozilla.com/D268604
Diffstat:
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
@@ -3435,6 +3435,7 @@ pref("browser.backup.disabled-on-idle-backup-retry", false);
// staging directories/archives are ones that the file system prevents us from
// removing for any reason.
pref("browser.backup.max-num-unremovable-staging-items", 5);
+pref("browser.backup.scheduled.user-disabled", false);
#ifdef NIGHTLY_BUILD
// Pref to enable the new profiles
diff --git a/browser/components/backup/BackupService.sys.mjs b/browser/components/backup/BackupService.sys.mjs
@@ -3155,6 +3155,12 @@ export class BackupService extends EventTarget {
if (shouldEnableScheduledBackups) {
// reset the error states when reenabling backup
Services.prefs.setIntPref(BACKUP_ERROR_CODE_PREF_NAME, ERRORS.NONE);
+ } else {
+ // set user-disabled pref if backup is being disabled
+ Services.prefs.setBoolPref(
+ "browser.backup.scheduled.user-disabled",
+ true
+ );
}
}