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
Measure final backup archive size to nearest mebibyte in order to understand how much disk space we are using on users' computers in order to back up their data
Differential Revision: https://phabricator.services.mozilla.com/D216708
- Adds a #recoveryInProgress member to BackupService to limit to one recovery at a time
- Adds recoveryInProgress and recoveryErrorCode properties to the BackupSettings component
- Has BackupUIChild set recoveryInProgress / recoveryErrorCode while a recovery is underway.
- Keeps the restore dialog open while the recovery is underway, disables the confirm button and updates it's text to "Restoring..."
- Has BackupUIChild close the recovery dialog if recovery is successful.
Figma: https://www.figma.com/design/vNbX4c0ws0L1qr0mxpKvsW/Fx-Backup?node-id=147-4568&t=rmWErO2I6lpY3Vz7-0
Differential Revision: https://phabricator.services.mozilla.com/D215677
- Adds a #recoveryInProgress member to BackupService to limit to one recovery at a time
- Adds recoveryInProgress and recoveryErrorCode properties to the BackupSettings component
- Has BackupUIChild set recoveryInProgress / recoveryErrorCode while a recovery is underway.
- Keeps the restore dialog open while the recovery is underway, disables the confirm button and updates it's text to "Restoring..."
- Has BackupUIChild close the recovery dialog if recovery is successful.
Figma: https://www.figma.com/design/vNbX4c0ws0L1qr0mxpKvsW/Fx-Backup?node-id=147-4568&t=rmWErO2I6lpY3Vz7-0
Differential Revision: https://phabricator.services.mozilla.com/D215677
This also adds a fake nsIOSKeyStore implementation for our xpcshell tests. This
should allow us to run these tests on apple_silicon in automation.
Differential Revision: https://phabricator.services.mozilla.com/D215707
Summary of updates:
- the "sensitive data" checkbox to toggle backup encryption is no longer displayed when a user turns off scheduled backups
- the "Change password" button, which only appears for encrypted backups, is now aligned with the checkbox + description to match the Figma spec
- once scheduled backups are turned off, the latest backup file is deleted via the `BackupService.deleteLastBackup()` method
Tests
- moved browser tests related to the turn-off scheduled backups dialog from `backup_settings.js` to their own file `browser_settings_turn_off_scheduled_backups.js`
- updated some browser tasks testing add/change password to have scheduled backups enabled by default
- added a chrome test for the sensitive data checkbox's visibility whenever scheduled backups are toggled on or off
Depends on https://phabricator.services.mozilla.com/D215543
Differential Revision: https://phabricator.services.mozilla.com/D215826
This exposes some UI to show the most recent backup timestamp
and location (if a recent backup exists), and buttons to show
that location, and to edit the location.
Differential Revision: https://phabricator.services.mozilla.com/D215543
Some of the Firefox profile backup code is executed within a web worker, so errors thrown in the worker do not automatically maintain their full context when caught in the main process.
This change creates a BackupError for throwing errors with causes specific to Firefox profile backup. The new error type is configured to work with the PromiseWorker machinery in the Firefox codebase in order to serialize and deserialize error details across the worker boundary.
Differential Revision: https://phabricator.services.mozilla.com/D215920
Clean up intermediate artifacts in order to be kind to users' disk space:
- remove staging folder after compressing the staging folder into a new single ZIP file
- remove that single ZIP file after embedding its contents into the backup HTML file
Differential Revision: https://phabricator.services.mozilla.com/D215542
This introduces error code causes that can be used by UI components to present context-relevant error text. This starts throwing errors with cause error codes in parts of the backup codebase, but there are still areas (especially at the boundary with web workers) where cause codes need to be introduced and handled.
Differential Revision: https://phabricator.services.mozilla.com/D215535
This implements getting the information needed to show the date of a backup in the restore component and showing the password input if that backup is encrypted.
- Adds a `getBackupFileInfo` method to `BackupService` that will call `sampleArchive` for a passed backup file and update the `backupFileInfo` in the state with a subset of that info.
- Update the `GetBackupFileInfo` event handler in `BackupUIParent` to use the new `getBackupFileInfo` method.
Differential Revision: https://phabricator.services.mozilla.com/D214899
50 pages per step and 50 milliseconds of waiting between pages seems to be able to copy sqlite databases in a reasonable amount of time while not causing noticeable performance issues on low-spec test hardware.
Differential Revision: https://phabricator.services.mozilla.com/D215428
This implements getting the information needed to show the date of a backup in the restore component and showing the password input if that backup is encrypted.
- Adds a `getBackupFileInfo` method to `BackupService` that will call `sampleArchive` for a passed backup file and update the `backupFileInfo` in the state with a subset of that info.
- Update the `GetBackupFileInfo` event handler in `BackupUIParent` to use the new `getBackupFileInfo` method.
Differential Revision: https://phabricator.services.mozilla.com/D214899