Commit graph

96 commits

Author SHA1 Message Date
Mike Conley
c8c70c3027 Bug 1900877 - Fix busted source docs due to malformed @see tag. r=backup-reviewers,fchasen
Differential Revision: https://phabricator.services.mozilla.com/D212788
2024-06-06 20:54:11 +00:00
Mike Conley
f2ba55b8ce Bug 1897278 - Add methods to BackupService to enable / disable encryption. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D211438
2024-06-05 15:24:15 +00:00
Mike Conley
5d4f808fd8 Bug 1897278 - Make the backups profile folder a constant accessible off of the BackupService class. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D211437
2024-06-05 15:24:14 +00:00
Stanca Serban
9d3c78368f Backed out 2 changesets (bug 1897278) for causing xpcshell failures in test_BackupService_enable_disable_encryption.js. CLOSED TREE
Backed out changeset b24523dedba4 (bug 1897278)
Backed out changeset d5e43f371c09 (bug 1897278)
2024-06-05 17:38:43 +03:00
Mike Conley
3c8ca8f533 Bug 1897278 - Add methods to BackupService to enable / disable encryption. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D211438
2024-06-05 13:49:29 +00:00
Mike Conley
d9cbedcf5a Bug 1897278 - Make the backups profile folder a constant accessible off of the BackupService class. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D211437
2024-06-05 13:49:28 +00:00
Mike Conley
946d79f7af Bug 1900618 - Disable test_ArchiveEncryptionState.js if running Apple silicon in automation. r=jmaher,backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D212603
2024-06-05 13:04:12 +00:00
Mike Conley
45fb308a44 Bug 1896715 - Create an ArchiveEncryptionState class for encrypting backups. r=djackson,backup-reviewers,kpatenio
This class will be used to generate the keys and ephemera necessary to
encrypt backups. The actual encryption will occur in a later patch.

The state can be serialized and deserialized to disk.

Differential Revision: https://phabricator.services.mozilla.com/D210718
2024-06-03 18:14:33 +00:00
Tamas Szentpeteri
6045fc076c Backed out changeset 5a69f64cfafc (bug 1896715) for causing mochitest failures on browser_all_files_referenced.js. CLOSED TREE 2024-06-03 20:22:36 +03:00
Mike Conley
4a7ab37759 Bug 1896715 - Create an ArchiveEncryptionState class for encrypting backups. r=djackson,backup-reviewers,kpatenio
This class will be used to generate the keys and ephemera necessary to
encrypt backups. The actual encryption will occur in a later patch.

The state can be serialized and deserialized to disk.

Differential Revision: https://phabricator.services.mozilla.com/D210718
2024-06-03 16:04:33 +00:00
Nikki Sharpley
ecc3669212 Bug 1892033 - Move sidebar style persistence from XULstore to SessionStore r=sidebar-reviewers,sessionstore-reviewers,backup-reviewers,dao,Gijs,sclements,kpatenio
Move style persistence from XULstore to SessionStore.

Follow up bug to fix persistence of sidebar when only a new tab is open and window is closed, and its
accompanying test `browser_sidebar_persist.js`: Bug 1898613

Depends on D207048

Differential Revision: https://phabricator.services.mozilla.com/D207787
2024-05-24 20:16:31 +00:00
kpatenio
a39846bf34 Bug 1893277 - build initial UI for turning on scheduled backups. r=backup-reviewers,firefox-desktop-core-reviewers ,fluent-reviewers,mconley
backup-settings changes:
- adds a new button in the Backup section of about:preferences / about:settings
- shows the turn on dialog after pressing the button

Turn on dialog behaviour (implemented):
- pressing the cancel will close the dialog
- pressing the confirm button will set the pref browser.backup.scheduled.enabled=true and close the dialog
- pressing the passwords checkbox will show more options

Turn on dialog behaviour (not implemented):
- requiring a password for the backup (see Bug 1895981)
- modifying the save location and showing a file picker (see Bug 1895943)

Other changes:
- tests for backup-settings and the turn on dialog
- Storybook template for the turn on dialog

Lo-fi Figma designs: https://www.figma.com/design/vNbX4c0ws0L1qr0mxpKvsW/Fx-Backup?node-id=147-4558&t=PYLY0QMN1n8GR9vW-0

Differential Revision: https://phabricator.services.mozilla.com/D209769
2024-05-17 17:36:33 +00:00
Gijs Kruitbosch
6caf5c363c Bug 1895692 - turn off import/no-unassigned-import for storybook files, r=reusable-components-reviewers,frontend-codestyle-reviewers,hjones
Differential Revision: https://phabricator.services.mozilla.com/D210475
2024-05-15 16:08:57 +00:00
Mike Conley
add5221d27 Bug 1892249 - Use nsIZipWriter to compress the staging folder. r=backup-reviewers,fchasen
This is an intermediary stage before the compressed archive gets (optionally)
encrypted and written into the container file. This is why there's not a whole
lot of testing for the compressed file - those tests will get added once it
completes its journey into the container file so that we can test both
extraction and decompression at the same time.

Differential Revision: https://phabricator.services.mozilla.com/D210311
2024-05-15 04:40:59 +00:00
Cristian Tuns
3e0499f290 Backed out changeset 6e2699724abd (bug 1892249) for causing marionette failures in PathUtils.cpp CLOSED TREE 2024-05-14 19:15:53 -04:00
Mike Conley
9244a0856d Bug 1892249 - Use nsIZipWriter to compress the staging folder. r=backup-reviewers,fchasen
This is an intermediary stage before the compressed archive gets (optionally)
encrypted and written into the container file. This is why there's not a whole
lot of testing for the compressed file - those tests will get added once it
completes its journey into the container file so that we can test both
extraction and decompression at the same time.

Differential Revision: https://phabricator.services.mozilla.com/D210311
2024-05-14 21:25:45 +00:00
Mike Conley
26bf957cd0 Bug 1893269 - Build out basic infrastructure for backup management UI. r=backup-reviewers,settings-reviewers,firefox-desktop-core-reviewers ,Gijs,fluent-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D209161
2024-05-09 21:34:35 +00:00
Mike Conley
48f3414572 Bug 1892959 - Stub out initial section for backup management within about:preferences. r=backup-reviewers,fluent-reviewers,settings-reviewers,desktop-theme-reviewers,flod,Gijs,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D209055
2024-05-08 20:37:04 +00:00
Sandor Molnar
20a7604314 Backed out changeset 5d2a72296044 (bug 1892959) for causing bc failures @ browser/components/preferences/tests/browser_bug731866.js CLOSED TREE 2024-05-08 19:44:06 +03:00
Mike Conley
826dcf2e18 Bug 1892959 - Stub out initial section for backup management within about:preferences. r=backup-reviewers,fluent-reviewers,settings-reviewers,desktop-theme-reviewers,flod,Gijs,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D209055
2024-05-08 15:21:37 +00:00
Mike Conley
79a2bf8aa0 Bug 1892771 - Clone the legacy client ID from the profile that initiated backup recovery. r=backup-reviewers,kpatenio
Data science wants us to copy the client IDs from whichever profile initiated recovery.
For legacy telemetry, the client ID is stored in a datareporting/state.json file.

This patch ensures that the client ID exists in the state.json file in the profile
that initiated recovery before then copying it over into the destination profile
for recovery.

This patch also updates the Marionette test to use a separate user profile to
initiate recovery from to ensure we get a unique client ID for it, compared to
the profile that the backup was created for.

Differential Revision: https://phabricator.services.mozilla.com/D209555
2024-05-07 13:10:28 +00:00
Mike Conley
cd028536ee Bug 1892479 - Add the legacy telemetry client ID to the backup manifest meta object. r=backup-reviewers,fchasen
Differential Revision: https://phabricator.services.mozilla.com/D209461
2024-05-07 13:10:28 +00:00
Mike Conley
b8f43c9efd Bug 1892312 - Copy times.json from profile that initiated recovery and record recovery time. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D209028
2024-05-06 16:47:00 +00:00
Mike Conley
74ebb5bd76 Bug 1892312 - Stop backing up times.json in MiscDataBackupResource. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D209026
2024-05-06 16:46:59 +00:00
Stanca Serban
046599f3d1 Backed out 4 changesets (bug 1892312) for causing linting opt failures.
Backed out changeset a471d91079ae (bug 1892312)
Backed out changeset 3c4d8db39a35 (bug 1892312)
Backed out changeset 197faa33654c (bug 1892312)
Backed out changeset 8510a0207087 (bug 1892312)
2024-05-06 19:17:04 +03:00
Mike Conley
ec400bfa62 Bug 1892312 - Copy times.json from profile that initiated recovery and record recovery time. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D209028
2024-05-06 15:18:40 +00:00
Mike Conley
38b02a34f2 Bug 1892312 - Stop backing up times.json in MiscDataBackupResource. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D209026
2024-05-06 15:18:39 +00:00
Nikki Sharpley
e900310aa3 Bug 1885894 - Remove sidebar persistence from XULStore r=sessionstore-reviewers,backup-reviewers,sidebar-reviewers,Gijs,mconley,sfoster,sclements
Since we are moving away from XUL for the revamped sidebar, remove persistence off of XULstore.
For now, this involves moving persistence of "sidebar-command" and "positionend" to SessionStore.

A follow up bug 1892033 for moving the style attribute to SessionStore has been filed. This is slightly more involved,
hence the separate patch.

Differential Revision: https://phabricator.services.mozilla.com/D207048
2024-05-06 15:11:20 +00:00
kpatenio
0ff602d0ba Bug 1888448 - Implement recover for SessionStoreBackupResource. r=backup-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D209319
2024-05-03 21:05:55 +00:00
Fred Chasen
5ed4c181c5 Bug 1890297 - Implement recover for AddonsBackupResource. r=backup-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D209174
2024-05-03 16:43:53 +00:00
Mike Conley
6093445ff2 Bug 1894301 - Avoid schema violation before writing backup manifest when not signed into an account. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D209040
2024-05-01 19:01:56 +00:00
Mike Conley
d46f8f0571 Bug 1892105 - Flesh out test_backup.py with some data to backup and recover. r=backup-reviewers,kpatenio
This patch updates test_backup.py to write some testing data into various data stores
that BackupService is backing up, create a backup, recover from that backup, and check
to see if the written data exists in the recovered profile.

This isn't exactly exhaustive - there are a number of data stores that aren't accounted
for here yet. Chiefly AddonsBackupResource and SessionStoreBackupResource (bug 1894004),
but also:

1. FxA sign-in status
2. Logins backups
3. Site Security Service State
4. ProfileAge data
5. WebRTC device ID mappings
6. Favicons
7. XUL Store data
8. Content preferences
9. Containers preferences
10. File handler preferences
11. Search preferences
12. user.js and chrome/ customizations

Still, this is a start, and certainly better than nothing. Bug 1894089 has been filed
to add more data to test the listed 12 items.

Differential Revision: https://phabricator.services.mozilla.com/D208939
2024-05-01 14:54:35 +00:00
Mike Conley
44105aba59 Bug 1892105 - Add a postRecoveryComplete Promise getter to BackupService. r=backup-reviewers,kpatenio
This Promise is mainly for use by Marionette tests to know when to check
data stores that might have been updated by postRecovery steps.

Differential Revision: https://phabricator.services.mozilla.com/D208938
2024-05-01 14:54:35 +00:00
Mike Conley
d1146ba51d Bug 1888440 - Implement recover for CookiesBackupResource. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D208894
2024-04-29 18:56:28 +00:00
kpatenio
7187cd351e Bug 1888446 - implement recover for PlacesBackupResource. r=backup-reviewers,places-reviewers,mconley,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D208565
2024-04-29 17:17:02 +00:00
kpatenio
aa7e677f7b Bug 1888442 - import recover for CredentialsAndSecurityBackupResource. r=backup-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D208806
2024-04-29 17:12:54 +00:00
Mike Conley
6196a435c3 Bug 1893362 - Workaround sphinx-js being unhappy with static async private methods. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D208625
2024-04-25 17:15:29 +00:00
Mike Conley
59189707f3 Bug 1888444 - Implement recover for FormHistoryBackupResource. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D208554
2024-04-25 16:59:09 +00:00
Mike Conley
7f6b5c9d4d Bug 1888445 - Implement recover and postRecovery for MiscDataBackupResource. r=backup-reviewers,fchasen
Differential Revision: https://phabricator.services.mozilla.com/D208372
2024-04-25 13:07:10 +00:00
Mike Conley
006fd0c04f Bug 1892335 - Have BackupService.init scan for and process a post-recovery.json file if it finds one. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D208203
2024-04-25 13:07:10 +00:00
Mike Conley
31c2867f20 Bug 1892304 - Add the FxA uid and email to the backup manifest if signed in when creating a backup. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D208191
2024-04-25 13:07:09 +00:00
Mike Conley
52d71266f3 Bug 1888447 - Implement recover for the PreferencesBackupResource. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D208162
2024-04-24 18:02:49 +00:00
Mike Conley
6b46a0bcb3 Bug 1890574 - Add a simple utility to initiate backup recovery in the debug tool. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D208157
2024-04-24 18:02:49 +00:00
Mike Conley
bc92f02a3f Bug 1891596 - Add initial recoverFromBackup method to BackupService. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D207929
2024-04-24 18:02:48 +00:00
Mike Conley
d3533a6465 Bug 1888436 - Add recover and postRecovery methods to BackupResource. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D207928
2024-04-23 02:54:49 +00:00
Mike Conley
9dd96ec1eb Bug 1886614 - Write a marionette test for the BackupService.createBackup method. r=backup-reviewers,kpatenio
This test can be run via:

./mach marionette-test browser/components/backup/test/marionette/test_backup.py

This also makes it so that BackupResource.copySqliteDatabases does not throw if
one of the passed in database files doesn't exist - it'll just ignore it and
move on. This required me to update some tests in order to create some fake
SQLite databases to ensure that the fake Sqlite connection was made and the
backup stub was called for the SQLite databases being copied.

Finally, this also fixes something I noticed - some of our BackupResource's
weren't returning null or objects as their ManifestEntry. This fixes that
and adds tests to cover that case.

Differential Revision: https://phabricator.services.mozilla.com/D207811
2024-04-23 02:54:49 +00:00
Fred Chasen
a20bdb0a06 Bug 1892007 - Add optional priority number to BackupResource. r=backup-reviewers,mconley
- Adds a static `priority` getter in BackupResource base class, which defaults to 0.
- Determine the order resources will be backed up sorted on that priority in `createBackup`, defaulting to unordered.
- Sets `PlacesBackupResource` position 1 so it will run first.

Differential Revision: https://phabricator.services.mozilla.com/D207934
2024-04-22 23:15:07 +00:00
kpatenio
1ca53421e5 Bug 1886613 - Rename staging folder once backup is done. r=backup-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D207821
2024-04-22 16:40:23 +00:00
kpatenio
9ec8f0a1bb Bug 1892138 - reduce failures for test_SessionStoreBackupResource. r=backup-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D207888
2024-04-18 18:16:41 +00:00
Mike Conley
4cd9dc862c Bug 1891141 - Create preferences for the pages per step and step delay used by BackupResources. r=backup-reviewers,fchasen
Differential Revision: https://phabricator.services.mozilla.com/D207568
2024-04-17 20:50:48 +00:00