Commit Graph

101 Commits

Author SHA1 Message Date
Mike Conley
acf9e6ac1f Bug 1910953 - Use a Web Lock to sequence deletions and creations of backups. r=backup-reviewers,fchasen
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
2024-08-06 13:54:35 +00:00
Stephen Thompson
ac06904751 Bug 1905157 - Display profile recovery error messages in UI r=backup-reviewers,fluent-reviewers,mconley,bolsson,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D216090
2024-07-26 16:41:40 +00:00
kpatenio
b5fb94df79 Bug 1896772 - verify and display password rules r=backup-reviewers,fluent-reviewers,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D216617
2024-07-25 22:23:34 +00:00
Norisz Fay
47349b3029 Backed out changeset 898c9afa27d2 (bug 1905157) for causing build bustages CLOSED TREE 2024-07-23 19:28:00 +03:00
Stephen Thompson
89c71a4a58 Bug 1905157 - Display profile recovery error messages in UI r=backup-reviewers,fluent-reviewers,mconley,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D216090
2024-07-23 15:54:15 +00:00
Stephen Thompson
98746465d5 Bug 1907625 - Measure final backup archive size r=backup-reviewers,mconley
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
2024-07-22 16:00:16 +00:00
Mike Conley
65f281083c Bug 1906912 - Make parseArchiveHeader resilient to partial Unicode characters in the buffer. r=mconley,backup-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D216849
2024-07-18 15:59:46 +00:00
Fred Chasen
96c11a71e5 Bug 1905154: Restore dialog should remain open while a backup recovery is in progress. r=backup-reviewers,fluent-reviewers,flod,sthompson
- 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
2024-07-15 16:29:48 +00:00
Stanca Serban
d4e8f2284a Backed out changeset d98136b45ed4 (bug 1905154) for causing mozilla::dom::PathUtils::InitFileWithPath related mochitests failures. CLOSED TREE 2024-07-13 02:15:07 +03:00
Fred Chasen
f740c2596e Bug 1905154: Restore dialog should remain open while a backup recovery is in progress. r=backup-reviewers,fluent-reviewers,flod,sthompson
- 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
2024-07-12 20:36:27 +00:00
Mike Conley
0bb93129cd Bug 1902336 - Make sure to properly re-encrypt payment methods with the local OSKeyStore after backup recovery. r=backup-reviewers,sthompson
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
2024-07-12 17:48:04 +00:00
Stephen Thompson
323750a60a Bug 1891146 - Measure places, favicons, and total profile backup time r=places-reviewers,Standard8,mconley
Differential Revision: https://phabricator.services.mozilla.com/D214983
2024-07-11 16:48:15 +00:00
Mike Conley
fb791f4457 Bug 1907136 - Don't forget to clear the last backup filename / timestamp preference caches when deleting the last backup. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D216201
2024-07-11 14:11:47 +00:00
Norisz Fay
3ef4a25161 Backed out changeset da52483d6274 (bug 1891146) for causing xpcshell failures on test_BackupService.js CLOSED TREE 2024-07-11 00:54:17 +03:00
Stephen Thompson
5afc105b07 Bug 1891146 - Measure places, favicons, and total profile backup time r=places-reviewers,Standard8,mconley
Differential Revision: https://phabricator.services.mozilla.com/D214983
2024-07-10 20:25:10 +00:00
Mike Conley
a44f7c8ceb Bug 1904925 - Fill out more of the backup-settings reusable component. r=backup-reviewers,fluent-reviewers,firefox-desktop-core-reviewers ,flod,kpatenio
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
2024-07-10 15:38:46 +00:00
Mike Conley
a3b982afa5 Bug 1903117 - Make the download link in the single-file archive work. r=backup-reviewers,desktop-theme-reviewers,dao,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D215503
2024-07-08 19:18:58 +00:00
Stephen Thompson
ad5c1d8ebf Bug 1906169 - Error plumbing for profile backup web worker r=backup-reviewers,mconley
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
2024-07-08 17:49:45 +00:00
Stephen Thompson
6e5f4652be Bug 1901758 - Remove intermediate artifacts during backup r=backup-reviewers,mconley
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
2024-07-08 15:52:28 +00:00
Stanca Serban
8ce85d1221 Backed out changeset f35d254c77a2 (bug 1903117) as requested for causing Bug 1906460. 2024-07-05 20:07:05 +03:00
Mike Conley
e1725482b4 Bug 1903117 - Make the download link in the single-file archive work. r=backup-reviewers,desktop-theme-reviewers,dao,kpatenio
Depends on D214451

Differential Revision: https://phabricator.services.mozilla.com/D215503
2024-07-04 19:25:17 +00:00
Mike Conley
23cb6c5aa8 Bug 1903127 - Move the single-file archive into the configured destination folder. r=backup-reviewers,fluent-reviewers,sthompson,flod,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D214451
2024-07-04 19:25:16 +00:00
Sandor Molnar
09fd2b89b8 Backed out 2 changesets (bug 1903117, bug 1903127) for causing xpc failures @ test_BackupService_resolveArchiveDestFolderPath.js CLOSED TREE
Backed out changeset 3d272e8ab369 (bug 1903117)
Backed out changeset afbf6e3d4145 (bug 1903127)
2024-07-04 21:16:44 +03:00
Mike Conley
7bfd959b85 Bug 1903117 - Make the download link in the single-file archive work. r=backup-reviewers,desktop-theme-reviewers,dao,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D215503
2024-07-04 17:30:41 +00:00
Mike Conley
5bd3c3fb5f Bug 1903127 - Move the single-file archive into the configured destination folder. r=backup-reviewers,fluent-reviewers,sthompson,flod,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D214451
2024-07-04 17:30:41 +00:00
Stephen Thompson
0bdfadda55 Bug 1904949 - Add cause error codes to backup service r=backup-reviewers,mconley
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
2024-07-04 14:03:21 +00:00
Fred Chasen
4080afa4ce Bug 1904146 - Add getBackupFileInfo method to BackupService to handle GetBackupFileInfo events. r=mconley
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
2024-07-03 19:53:34 +00:00
Cristian Tuns
63f5f0e2d1 Backed out changeset 5c817eb3498b (bug 1891146) for causing xpcshell failures in test_BackupService.js (Bug 1905413) CLOSED TREE 2024-06-28 16:10:51 -04:00
Stephen Thompson
d3f943915d Bug 1891146 - Measure places, favicons, and total profile backup time r=places-reviewers,Standard8,mconley
Differential Revision: https://phabricator.services.mozilla.com/D214983
2024-06-28 17:56:39 +00:00
Mike Conley
b4a1bad483 Bug 1903064 - Prevent recovery from backups created from an application with a newer appVersion. r=backup-reviewers,sthompson,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D215004
2024-06-28 15:50:31 +00:00
Mike Conley
b420e6f986 Bug 1903606 - Prevent recovery from backups created from an application with a different appName. r=backup-reviewers,sthompson,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D215002
2024-06-28 15:50:30 +00:00
Stanca Serban
6dd32359fe Backed out changeset edf305a8036e (bug 1904146) for causing mochitests failures in browser_settings_turn_on_scheduled_backups.js. 2024-06-28 02:20:50 +03:00
Fred Chasen
fe16fc1d18 Bug 1904146 - Add getBackupFileInfo method to BackupService to handle GetBackupFileInfo events. r=mconley
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
2024-06-27 19:04:46 +00:00
Mike Conley
d8f42dafcd Bug 1901526 - Build out backup scheduling mechanism. r=backup-reviewers,kpatenio,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D213468
2024-06-27 17:27:27 +00:00
Stephen Thompson
e789eddb3e Bug 1887765 - BackupService total backup size metric r=backup-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D214438
2024-06-25 17:35:34 +00:00
Mike Conley
f1aee3dbb7 Bug 1901534 - Compute a new ArchiveEncryptionState for a recovered, encrypted profile. r=backup-reviewers,fchasen
Differential Revision: https://phabricator.services.mozilla.com/D214392
2024-06-25 00:35:44 +00:00
Mike Conley
6dedf6b415 Bug 1891854 - Do not backup session cookies if backup encryption is not enabled. r=backup-reviewers,fchasen
Differential Revision: https://phabricator.services.mozilla.com/D214318
2024-06-25 00:35:44 +00:00
Mike Conley
85ae68fe2e Bug 1901520 - Part 3: Add tests for the rendered template. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D214027
2024-06-25 00:35:43 +00:00
Mike Conley
f28634d0f8 Bug 1901520 - Part 2: Add styles and scripts to the single file archive. r=backup-reviewers,frontend-codestyle-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D213975
2024-06-25 00:35:43 +00:00
Mike Conley
c6adb68ed0 Bug 1901520 - Part 1: Send localized template down to the archive worker. r=backup-reviewers,fluent-reviewers,kpatenio,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D213974
2024-06-25 00:35:43 +00:00
Sandor Molnar
f5cc48988c Backed out 5 changesets (bug 1901534, bug 1891854, bug 1901520) for causing xpc failures @ test_BackupService_renderTemplate.js CLOSED TREE
Backed out changeset 5e494cb0aff6 (bug 1901534)
Backed out changeset e8773eda97c1 (bug 1891854)
Backed out changeset 4b079909d830 (bug 1901520)
Backed out changeset 5509d1905d2c (bug 1901520)
Backed out changeset 6d98566735ad (bug 1901520)
2024-06-25 01:24:56 +03:00
Mike Conley
43b60062c1 Bug 1901534 - Compute a new ArchiveEncryptionState for a recovered, encrypted profile. r=backup-reviewers,fchasen
Differential Revision: https://phabricator.services.mozilla.com/D214392
2024-06-24 20:47:06 +00:00
Mike Conley
ecb25d3a8b Bug 1891854 - Do not backup session cookies if backup encryption is not enabled. r=backup-reviewers,fchasen
Differential Revision: https://phabricator.services.mozilla.com/D214318
2024-06-24 20:47:05 +00:00
Mike Conley
397c08d552 Bug 1901520 - Part 3: Add tests for the rendered template. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D214027
2024-06-24 20:47:05 +00:00
Mike Conley
1c0ab38d1f Bug 1901520 - Part 2: Add styles and scripts to the single file archive. r=backup-reviewers,frontend-codestyle-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D213975
2024-06-24 20:47:05 +00:00
Mike Conley
778ea1791c Bug 1901520 - Part 1: Send localized template down to the archive worker. r=backup-reviewers,fluent-reviewers,kpatenio,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D213974
2024-06-24 20:47:04 +00:00
Mike Conley
7fb7aa2030 Bug 1901523 - Stage and store backup snapshots under backups/snapshots. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D213078
2024-06-22 00:52:40 +00:00
Mike Conley
45c44b8ada Bug 1903629 - Run nsIZipReader.test() on the recovery archive before decompressing it. r=backup-reviewers,fchasen
Differential Revision: https://phabricator.services.mozilla.com/D214304
2024-06-22 00:52:40 +00:00
Mike Conley
ad5e2c22bd Bug 1901528 - Part 2: Support recovering from single-file archives. r=backup-reviewers,fchasen
Differential Revision: https://phabricator.services.mozilla.com/D213228
2024-06-22 00:52:39 +00:00
Mike Conley
c59dde8ed4 Bug 1901528 - Part 1: Rename BackupService.recoverFromBackup to BackupService.recoverFromSnapshotFolder. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D213227
2024-06-22 00:52:39 +00:00