This adds an asynchronous method to lock the startup files using the same
lock that we use during normal startup.
The profile service then uses this lock to gate access to the profiles.ini
files adding a method to async flush the entire database or in the case
that the on-disk database has changed a way to mergwe in some properties
about the current profile into the on-disk version.
Differential Revision: https://phabricator.services.mozilla.com/D222662
This adds an asynchronous method to lock the startup files using the same
lock that we use during normal startup.
The profile service then uses this lock to gate access to the profiles.ini
files adding a method to async flush the entire database or in the case
that the on-disk database has changed a way to mergwe in some properties
about the current profile into the on-disk version.
Differential Revision: https://phabricator.services.mozilla.com/D222662
We don't want to regenerate a backup if scheduled backups are disabled, so
we now do a check inside of the DeferredTask for the scheduling pref before
attempting a regeneration.
The prior patches in this stack cause us to attempt to delete any known
backups when doing certain clearing operations. If a backup destination
folder was not configured or is pointing at a non-existant directory,
this can cause us to throw. This is non-fatal but annoying.
This patch is some belt-and-suspenders which changes the behaviour so that:
1. Deletion is not attempted if scheduled backups are not enabled.
2. The backup destination pref is checked for non-empty values before
attempting to check its existence.
3. The existence check is wrapped in a try/catch in the event that
the destination pref is set to an invalid path for the OS.
Differential Revision: https://phabricator.services.mozilla.com/D221478
This also reorganizes things a bit in BackupService so that uninitBackupScheduler
also disarms the debouncer and any queued debounced jobs end up being inert.
Differential Revision: https://phabricator.services.mozilla.com/D218877
This also reorganizes things a bit in BackupService so that uninitBackupScheduler
also disarms the debouncer and any queued debounced jobs end up being inert.
Differential Revision: https://phabricator.services.mozilla.com/D218877
This is a BackupManifest schema change that will break recovering from
any backups created before this change. However, considering that we
haven't released this feature yet, I figured it wasn't worth the
effort of doing a schema version bump or handling of the prior
version.
I'm making the field optional in the BackupManifest because in the
event that we decide to backport the backup component to ESR 115,
we need to handle the fact that ESR 115 has no notion of a profile
group ID (and is unlikely to ever have such a notion).
Differential Revision: https://phabricator.services.mozilla.com/D218976
Currently, clicking "confirm" buttons on modals in the profile backup settings menu will always close the modals regardless of whether the operation succeeded or failed. In the case of errors, users don't know that something went wrong. It's better to keep the modals open and display an error so that the user knows what to do next and can try to fix the issue, if applicable.
Differential Revision: https://phabricator.services.mozilla.com/D218358
Currently, clicking "confirm" buttons on modals in the profile backup settings menu will always close the modals regardless of whether the operation succeeded or failed. In the case of errors, users don't know that something went wrong. It's better to keep the modals open and display an error so that the user knows what to do next and can try to fix the issue, if applicable.
Differential Revision: https://phabricator.services.mozilla.com/D218358
This allows us to avoid creating a backup while we're in the middle of deleting
one, and deleting a backup when we're in the middle of creating one.
An AbortController is used to clear the lock's request queue on shutdown
in the (unlikely) event that a whole slew of backup creation and deletion
requests have queued up.
Differential Revision: https://phabricator.services.mozilla.com/D218240
The patch adds tests for D216762 and D216762.
Tests verify the following:
- Events dispatched by the password-validation-inputs component
- Password validation
- turn-on-scheduled-backups and enable-backup-encryption interactivity modified inputs
Additional changes:
- adding a head.js file for chrome tests
- moving some helper functions used by browser and chrome tests to their respective head.js files
Differential Revision: https://phabricator.services.mozilla.com/D216892
The patch adds `password-validation-inputs` into `turn-on-scheduled-backups`, therefore removing the need for duplicate password fields and validation logic in the latter component. The turn-on dialog is notified via a dispatched event whenever a valid and invalid password pair is entered.
Tests are written in D216892
Depends on D216617
Differential Revision: https://phabricator.services.mozilla.com/D216762