Commit Graph

224 Commits

Author SHA1 Message Date
Butkovits Atila
20cd2bfd08 Backed out changeset fe441360b591 (bug 1915216) for causing leaks at ThreadSafeWeakReference. CLOSED TREE 2024-10-17 19:11:29 +03:00
Dave Townsend
4d68ba5791 Bug 1915216: Add a method to asynchronously write the important data about the current profile to the INI file on disk. r=glandium,jhirsch,pehrsons,backup-reviewers,mconley
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
2024-10-17 15:09:41 +00:00
Norisz Fay
e8694852ee Backed out changeset 46f4c195d34a (bug 1915216) for causing async related xpcshell failures CLOSED TREE 2024-10-16 18:07:26 +03:00
Dave Townsend
75cb8ade57 Bug 1915216: Add a method to asynchronously write the important data about the current profile to the INI file on disk. r=glandium,jhirsch,pehrsons,backup-reviewers,mconley
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
2024-10-16 08:32:25 +00:00
Mike Conley
afb930d214 Bug 1923125 - Don't regenerate backups on batched cookie deletion due to expiry / size limits. r=kpatenio,backup-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D224832
2024-10-09 14:06:20 +00:00
Mike Conley
69fe481887 Bug 1890427 - Part 11: Avoid regenerating when scheduled backups disabled, and deleting non-existant backup destination folder. r=backup-reviewers,kpatenio
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
2024-09-18 13:32:12 +00:00
Mike Conley
b7bcb4dc52 Bug 1890427 - Part 10: Use an observer to regenerate backups on newtab links being blocked. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D218880
2024-09-18 13:32:11 +00:00
Mike Conley
5d294d5f3d Bug 1890427 - Part 9: Use an observer to regenerate backups on cookie removal. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D218879
2024-09-18 13:32:11 +00:00
Mike Conley
c38ff72c4c Bug 1890427 - Part 8: Use an observer to regenerate backups on permission removal. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D218878
2024-09-18 13:32:10 +00:00
Mike Conley
1e876ebf64 Bug 1890427 - Part 7: Use an observer to regenerate backups on data sanitization. r=backup-reviewers,kpatenio
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
2024-09-18 13:32:10 +00:00
Mike Conley
d811f82945 Bug 1890427 - Part 6: Use an observer to regenerate backups when an address is deleted. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D218876
2024-09-18 13:32:10 +00:00
Mike Conley
051850805e Bug 1890427 - Part 5: Use an observer to regenerate backups when a payment method is deleted. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D218875
2024-09-18 13:32:09 +00:00
Mike Conley
89ce1cb51b Bug 1890427 - Part 4: Use an AddonListener to regenerate backups when an addon is uninstalled. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D218874
2024-09-18 13:32:09 +00:00
Mike Conley
5e0572f68f Bug 1890427 - Part 3: Use a PlacesObserver to regenerate backups when a bookmark is deleted. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D218886
2024-09-18 13:32:08 +00:00
Mike Conley
67293d208f Bug 1890427 - Part 2: Use an observer to regenerate backups when a password is deleted. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D218873
2024-09-18 13:32:08 +00:00
Mike Conley
9570092c28 Bug 1890427 - Part 1: Use a PlacesObserver to regenerate backups when pages are removed or history is cleared. r=backup-reviewers,kpatenio
This debounces backup regenerations using a DeferredTask.

Differential Revision: https://phabricator.services.mozilla.com/D218872
2024-09-18 13:32:07 +00:00
Mike Conley
154be6716d Bug 1914940 - Do not back up permissions or content prefs databases if the browser is not configured to remember history, or to clear history on shutdown. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D221552
2024-09-17 13:54:28 +00:00
Mike Conley
b4e120a34f Bug 1914936 - Do not back up cookies if the browser is not configured to remember history, or to clear history on shutdown. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D221551
2024-09-17 13:54:27 +00:00
Mike Conley
c052d17afd Bug 1914926 - Do not back up form history if the browser is not configured to remember history, or to clear history on shutdown. r=backup-reviewers,places-reviewers,mak,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D221550
2024-09-17 13:54:27 +00:00
Eemeli Aro
b3031aa097 Bug 1889417 - Fix minor Fluent bugs in various tests. r=fluent-reviewers,credential-management-reviewers,fxview-reviewers,places-reviewers,omc-reviewers,backup-reviewers,urlbar-reviewers,dimi,Standard8,nsharpley,mconley,flod,emcminn
Issues revealed by adding a `MOZ_ASSERT(false)` in Fluent error reporting and trawling through the resulting logs.

Differential Revision: https://phabricator.services.mozilla.com/D221421
2024-09-10 19:03:18 +00:00
Butkovits Atila
9095b72df7 Backed out 10 changesets (bug 1890427) for causing failures at LateWriteChecks.cpp. CLOSED TREE
Backed out changeset b3ea334a7968 (bug 1890427)
Backed out changeset 8534805fac67 (bug 1890427)
Backed out changeset 2b31d978a116 (bug 1890427)
Backed out changeset f1db7acebebe (bug 1890427)
Backed out changeset 57b90c2b57be (bug 1890427)
Backed out changeset c72168ca8f99 (bug 1890427)
Backed out changeset 6ccf8483a0c1 (bug 1890427)
Backed out changeset 76ac3e81db91 (bug 1890427)
Backed out changeset 6599f4c9d1cb (bug 1890427)
Backed out changeset 054da7263696 (bug 1890427)
2024-09-05 01:05:36 +03:00
Mike Conley
7e5dab7371 Bug 1910968 - Make sure unverified search engines stay unverified during backup recovery. r=Standard8,backup-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D218656
2024-09-04 18:04:49 +00:00
Mike Conley
51225be16e Bug 1890427 - Part 10: Use an observer to regenerate backups on newtab links being blocked. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D218880
2024-09-04 17:56:59 +00:00
Mike Conley
4887d56637 Bug 1890427 - Part 9: Use an observer to regenerate backups on cookie removal. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D218879
2024-09-04 17:56:59 +00:00
Mike Conley
b9636f86f1 Bug 1890427 - Part 8: Use an observer to regenerate backups on permission removal. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D218878
2024-09-04 17:56:58 +00:00
Mike Conley
7ca5c1c77a Bug 1890427 - Part 7: Use an observer to regenerate backups on data sanitization. r=backup-reviewers,kpatenio
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
2024-09-04 17:56:58 +00:00
Mike Conley
2d3cbfc487 Bug 1890427 - Part 6: Use an observer to regenerate backups when an address is deleted. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D218876
2024-09-04 17:56:57 +00:00
Mike Conley
01d75928e9 Bug 1890427 - Part 5: Use an observer to regenerate backups when a payment method is deleted. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D218875
2024-09-04 17:56:57 +00:00
Mike Conley
a0f2bc1d52 Bug 1890427 - Part 4: Use an AddonListener to regenerate backups when an addon is uninstalled. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D218874
2024-09-04 17:56:57 +00:00
Mike Conley
b54ccf35a1 Bug 1890427 - Part 3: Use a PlacesObserver to regenerate backups when a bookmark is deleted. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D218886
2024-09-04 17:56:56 +00:00
Mike Conley
a534022f9b Bug 1890427 - Part 2: Use an observer to regenerate backups when a password is deleted. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D218873
2024-09-04 17:56:56 +00:00
Mike Conley
5c50c56a5d Bug 1890427 - Part 1: Use a PlacesObserver to regenerate backups when pages are removed or history is cleared. r=backup-reviewers,kpatenio
This debounces backup regenerations using a DeferredTask.

Differential Revision: https://phabricator.services.mozilla.com/D218872
2024-09-04 17:56:55 +00:00
Mike Conley
d23cddd9e6 Bug 1893485 - Add the profileGroupID to the backup manifest. r=backup-reviewers,kpatenio
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
2024-09-04 17:39:33 +00:00
Mark Banner
93484bda6a Bug 1911981 - Replace use of SearchTestUtils.useTestEngines with setRemoteSettingsConfig in non-search test code. r=mbeier,backup-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D219894
2024-08-27 16:01:45 +00:00
Mark Banner
30d0ab196c Bug 1870226 - Upgrade eslint-plugin-jsdoc to version 50.2.2. r=zombie,frontend-codestyle-reviewers,translations-reviewers,backup-reviewers,kpatenio
Also fixes a few issues found with the newer versions of eslint-plugin-jsdoc.

Differential Revision: https://phabricator.services.mozilla.com/D219513
2024-08-23 16:43:57 +00:00
Mark Banner
f675b28f2a Bug 1870226 - Fix missing jsdoc @returns for other browser code. r=firefox-desktop-core-reviewers ,backup-reviewers,kpatenio.
Differential Revision: https://phabricator.services.mozilla.com/D219510
2024-08-23 16:43:56 +00:00
Butkovits Atila
11a5a23896 Backed out 7 changesets (bug 1870226) for causing build bustages. CLOSED TREE
Backed out changeset 619244623dba (bug 1870226)
Backed out changeset e85a5647cae4 (bug 1870226)
Backed out changeset 21ea9baf83ea (bug 1870226)
Backed out changeset a506c0f0ce28 (bug 1870226)
Backed out changeset 77c78201a206 (bug 1870226)
Backed out changeset 7a98dfef087f (bug 1870226)
Backed out changeset f64ad89c2406 (bug 1870226)
2024-08-23 12:22:02 +03:00
Mark Banner
7a83443ddf Bug 1870226 - Upgrade eslint-plugin-jsdoc to version 50.2.2. r=zombie,frontend-codestyle-reviewers,translations-reviewers,backup-reviewers,kpatenio
Also fixes a few issues found with the newer versions of eslint-plugin-jsdoc.

Differential Revision: https://phabricator.services.mozilla.com/D219513
2024-08-23 08:55:49 +00:00
Mark Banner
f578ce9062 Bug 1870226 - Fix missing jsdoc @returns for other browser code. r=firefox-desktop-core-reviewers ,backup-reviewers,kpatenio.
Differential Revision: https://phabricator.services.mozilla.com/D219510
2024-08-23 08:55:48 +00:00
Mike Conley
c90d4837db Bug 1912529 - Add high-level architecture documentation for BackupService to source docs. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D218992
2024-08-15 14:42:21 +00:00
Mike Conley
0fd6ad1fe4 Bug 1888412 - Add BackupResource subclasses to source docs. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D218991
2024-08-15 14:42:20 +00:00
Stephen Thompson
ac28601c38 Bug 1901308 - Show profile backup errors and keep modals open r=backup-reviewers,fluent-reviewers,firefox-desktop-core-reviewers ,mconley,bolsson
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
2024-08-06 18:21:16 +00:00
Narcis Beleuzu
e69542173f Backed out changeset bd72ed21a114 (bug 1901308) for Doc failure on BackupUIChild.sys . CLOSED TREE 2024-08-06 20:46:23 +03:00
Stephen Thompson
1b8f32ff12 Bug 1901308 - Show profile backup errors and keep modals open r=backup-reviewers,fluent-reviewers,firefox-desktop-core-reviewers ,mconley,bolsson
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
2024-08-06 14:56:53 +00:00
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
Mike Conley
99a19484ba Bug 1896449 - Recompute verification hashes for non-default engines during backup recovery. r=backup-reviewers,search-reviewers,Standard8,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D215963
2024-07-31 19:38:20 +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
c08f380406 Bug 1896772 - add tests for the password rules component r=backup-reviewers,sthompson
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
2024-07-25 22:23:35 +00:00
kpatenio
a17737f6f6 Bug 1896772 - embed password fields as a separate component into the turn-on-scheduled-backups dialog r=backup-reviewers,sthompson
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
2024-07-25 22:23:35 +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