From da7194fd15970a9b161394e4e2b2ca170703eff2 Mon Sep 17 00:00:00 2001 From: Claudio DeSouza Date: Tue, 25 Jun 2024 14:04:41 +0100 Subject: [PATCH] `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 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 --- utility/importer/chrome_importer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utility/importer/chrome_importer.cc b/utility/importer/chrome_importer.cc index 797c232b966..6b21d0be686 100644 --- a/utility/importer/chrome_importer.cc +++ b/utility/importer/chrome_importer.cc @@ -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; }