LoginDatabase::Init requires a db encryptor

This function now takes a db encryptor argument, which can be `nullptr`.
This change corrects its call for the chrome importer, which doesn't
make use of any encryptors.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/9da3ba33b3d6d82f45d9b8c1538c7b06888dee17

commit 9da3ba33b3d6d82f45d9b8c1538c7b06888dee17
Author: Viktor Semeniuk <vsemeniuk@google.com>
Date:   Fri Jun 21 11:56:12 2024 +0000

    Pass os_crypt_async::Encryptor to LoginDatabase::Init

    This CL allows LoginDatabase to use os_crypt_async::Encryptor. When
    Encryptor is provided it's used to encrypt/decrypt password.

    PasswordStoreBuiltInBackend is updated to accept
    os_crypt_async::OSCryptAsync. When provided LoginDatabase::Init call
    is postponed until Encryptor is obtained.

    Bug: 345691490
This commit is contained in:
Claudio DeSouza
2024-08-07 21:31:15 -04:00
committed by mkarolin
parent 190e947e30
commit da7194fd15
+1 -1
View File
@@ -463,7 +463,7 @@ void ChromeImporter::ImportPasswords(
password_manager::LoginDatabase database(
copy_password_file.copied_file_path(),
password_manager::IsAccountStore(false));
if (!database.Init()) {
if (!database.Init(nullptr)) {
LOG(ERROR) << "LoginDatabase Init() failed";
return;
}