diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /browser/components/backup/resources/CredentialsAndSecurityBackupResource.sys.mjs | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/backup/resources/CredentialsAndSecurityBackupResource.sys.mjs')
-rw-r--r-- | browser/components/backup/resources/CredentialsAndSecurityBackupResource.sys.mjs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/browser/components/backup/resources/CredentialsAndSecurityBackupResource.sys.mjs b/browser/components/backup/resources/CredentialsAndSecurityBackupResource.sys.mjs index 89069de826..03a0267f33 100644 --- a/browser/components/backup/resources/CredentialsAndSecurityBackupResource.sys.mjs +++ b/browser/components/backup/resources/CredentialsAndSecurityBackupResource.sys.mjs @@ -16,6 +16,42 @@ export class CredentialsAndSecurityBackupResource extends BackupResource { return true; } + async backup(stagingPath, profilePath = PathUtils.profileDir) { + const simpleCopyFiles = [ + "pkcs11.txt", + "logins.json", + "logins-backup.json", + "autofill-profiles.json", + "signedInUser.json", + ]; + await BackupResource.copyFiles(profilePath, stagingPath, simpleCopyFiles); + + const sqliteDatabases = ["cert9.db", "key4.db", "credentialstate.sqlite"]; + await BackupResource.copySqliteDatabases( + profilePath, + stagingPath, + sqliteDatabases + ); + + return null; + } + + async recover(_manifestEntry, recoveryPath, destProfilePath) { + const files = [ + "pkcs11.txt", + "logins.json", + "logins-backup.json", + "autofill-profiles.json", + "signedInUser.json", + "cert9.db", + "key4.db", + "credentialstate.sqlite", + ]; + await BackupResource.copyFiles(recoveryPath, destProfilePath, files); + + return null; + } + async measure(profilePath = PathUtils.profileDir) { const securityFiles = ["cert9.db", "pkcs11.txt"]; let securitySize = 0; |