Commit Graph

51 Commits

Author SHA1 Message Date
Mike Conley
89eee9ec2c Bug 1904337 - Stop backing up signedInUser.json. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D215017
2024-06-27 14:47:13 +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
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
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
0adb271bf9 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
afeeb05292 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
77cc188b7a 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
4792f8ea5d 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
f0682248ea 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
kpatenio
1ed5674500 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
de6192b5bb 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
47cb2e4b60 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
1ddd494dbd 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
b3f402d410 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
8f084a79be 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
0d6c591655 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
e240968ed7 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
213b3dbbef 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
782c9958bd 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
14509a1366 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
Mike Conley
df2ca1d62c 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
kpatenio
a6f22c8b9f Bug 1885941 - implement backup method for cookies, form history and sessions BackupResources. r=backup-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D207495
2024-04-17 20:43:38 +00:00
Fred Chasen
607439a7a7 Bug 1885614 - Implement backup method for AddonsBackupResource. r=backup-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D207491
2024-04-16 19:27:25 +00:00
Mike Conley
7962b5b730 Bug 1890585 - Have MiscDataBackupResource backup the ActivityStreamStorage snippets table. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D207460
2024-04-16 19:18:33 +00:00
kpatenio
45734a7202 Bug 1885929 - Implement backup method for CredentialsAndSecurityBackupResource. r=backup-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D207286
2024-04-15 20:18:40 +00:00
Mike Conley
79d94225c6 Bug 1890591 - Add some utilities to BackupResource for copying files and Sqlite databases. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D207155
2024-04-15 14:47:20 +00:00
kpatenio
18eff163a1 Bug 1885609 - implement backup method for PlacesBackupResource. r=backup-reviewers,places-reviewers,mak,mconley
Implements `PlacesBackupResource.backup` to store a copy of `places.sqlite` and `favicons.sqlite` in the staging folder.

If users don't want history remembered or use permanent private browsing mode, we will backup bookmarks instead to a file called `bookmarks.json`. Automatic backup is not yet implemented, so to test changes locally, go to `chrome://browser/content/backup/debug.html` to view where we store the staging folder and to manually run the backup methods for all available backup resources.

Backup files for `PlacesBackupResource` should be under the `places` subfolder in the staging folder.

Differential Revision: https://phabricator.services.mozilla.com/D206532
2024-04-10 21:21:17 +00:00
Mike Conley
19ee6676d2 Bug 1885944 - Implement backup method for MiscDataBackupResource. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D207057
2024-04-10 13:36:58 +00:00
Mike Conley
346cdfd25a Bug 1890644 - Make it clear that backup method on a BackupResource can return null. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D207071
2024-04-09 20:02:34 +00:00
Mike Conley
95d89beff6 Bug 1890294 - Add a requiresEncryption static getter on BackupResource for subclasses to override. r=backup-reviewers,places-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D206910
2024-04-09 15:15:34 +00:00
Mike Conley
112115ea38 Bug 1885939 - Implement backup method for PreferencesBackupResource. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D205929
2024-04-05 14:05:42 +00:00
kpatenio
467043a452 Bug 1889747 - signedInUser.json file size measurement should be done in CredentialsAndSecurityBackupResource.sys.mjs. r=backup-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D206704
2024-04-04 23:04:19 +00:00
Fred Chasen
3a31055347 Bug 1883655 - Add disk size measurements for all addons and extensions data. data-review=jhirsch r=backup-reviewers,mconley,rpl
Differential Revision: https://phabricator.services.mozilla.com/D204675
2024-04-04 21:43:41 +00:00
Cristian Tuns
30299ac418 Backed out changeset 21aa60d7cd79 (bug 1883655) for causing xpcshell failures in test_measurements.js CLOSED TREE 2024-04-04 14:54:49 -04:00
Fred Chasen
5ab32eace0 Bug 1883655 - Add disk size measurements for all addons and extensions data. data-review=jhirsch r=backup-reviewers,mconley,rpl
Differential Revision: https://phabricator.services.mozilla.com/D204675
2024-04-04 16:17:44 +00:00
Iulian Moraru
680fed88a5 Backed out changeset adba8777ed32 (bug 1883655) for causing xpcshell failures on test_measurements.js. 2024-04-03 06:15:55 +03:00
Fred Chasen
ca41eee79c Bug 1883655 - Add disk size measurements for all addons and extensions data. data-review=jhirsch r=backup-reviewers,mconley,rpl
Differential Revision: https://phabricator.services.mozilla.com/D204675
2024-04-02 21:43:14 +00:00
kpatenio
6cb1c13ab3 Bug 1887746 - Add disk size measurements for all sqlite files in storage/permanent/chrome. r=backup-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D205776
2024-04-02 16:49:13 +00:00
Mike Conley
f73e83475a Bug 1885372 - Create a basic createBackup method on BackupService. r=backup-reviewers,fchasen
Differential Revision: https://phabricator.services.mozilla.com/D205626
2024-03-27 13:36:05 +00:00
Fred Chasen
3f0ce216dc Bug 1883740 - Add disk size measurements for cookies, form history and sessions. data-review=jhirsch r=backup-reviewers,mconley
- Adds `CookiesBackupResource`, `FormHistoryBackupResource` and `SessionsStoreBackupResource` classes with measurement methods for those resources.
- Exports `BYTES_IN_KB` and new `bytesToFuzzyKilobytes` methods from `BackupResource`
- Fix filename for `BackupResource` tests.

Differential Revision: https://phabricator.services.mozilla.com/D205254
2024-03-26 20:15:48 +00:00
kpatenio
d126ea6391 Bug 1883747 - Add disk size measurements for a miscellaneous bag of data stores r=backup-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D205503
2024-03-26 16:24:58 +00:00
Cristian Tuns
a15db1a730 Backed out changeset 3cbb780fbe07 (bug 1883740) for causing xpcshell failures in test_measurements.js CLOSED TREE 2024-03-25 18:23:09 -04:00
Fred Chasen
0822671fd6 Bug 1883740 - Add disk size measurements for cookies, form history and sessions. data-review=jhirsch r=backup-reviewers,mconley
- Adds `CookiesBackupResource`, `FormHistoryBackupResource` and `SessionsStoreBackupResource` classes with measurement methods for those resources.
- Exports `BYTES_IN_KB` and new `bytesToFuzzyKilobytes` methods from `BackupResource`
- Fix filename for `BackupResource` tests.

Differential Revision: https://phabricator.services.mozilla.com/D205254
2024-03-25 18:45:52 +00:00
kpatenio
e4aa9d8240 Bug 1883739 - Add disk size measurements for all general user preference and user permission stores. r=backup-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D205130
2024-03-22 18:58:26 +00:00
Noemi Erli
2a3644d25e Backed out changeset 4816ddcf03ba (bug 1883739) for causing failures in test_measurements.js CLOSED TREE
browser/components/backup/metrics.yaml HG: changed browser/components/backup/moz.build HG: changed browser/components/backup/tests/xpcshell/test_measurements.js HG: changed toolkit/components/telemetry/Scalars.yaml HG: removed
browser/components/backup/resources/PreferencesBackupResource.sys.mjs
2024-03-21 01:16:11 +02:00
kpatenio
4dbd04e263 Bug 1883739 - Add disk size measurements for all general user preference and user permission stores. r=backup-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D205130
2024-03-20 17:34:29 +00:00
kpatenio
59903fe3dd Bug 1883736 - Add disk size measurements for all logins, keys, certificates and payment methods stores. r=backup-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D204948
2024-03-20 15:53:24 +00:00
kpatenio
c7a5ebed10 Bug 1883642 - Add disk size measurements for places.sqlite and favicons.sqlite. r=backup-reviewers,places-reviewers,mconley,mak
Differential Revision: https://phabricator.services.mozilla.com/D204528
2024-03-18 18:31:10 +00:00
Fred Chasen
a0c49755c4 Bug 1884995 - Add BackupResource abstract class. r=mconley,backup-reviewers
Adds a `BackupResource` abstract class to be extended by more specific resource handlers and a `BackupResources` module which resources can be registered with.

The BackupResource base includes helpers to get the size of files and directories.

All registed resources will be provided to the `BackupService` constructor for it instantiate them.

Differential Revision: https://phabricator.services.mozilla.com/D203795
2024-03-13 19:08:05 +00:00
Cristian Tuns
3c0612e620 Backed out changeset c4f4e70ebe00 (bug 1884995) for causing bc failures in browser_all_files_referenced.js CLOSED TREE 2024-03-13 13:42:26 -04:00