#include "components/os_crypt/async/browser/os_crypt_async.h"
#include <memory>
#include <vector>
#include "base/callback_list.h"
#include "base/check_op.h"
#include "base/dcheck_is_on.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/ranges/algorithm.h"
#include "base/sequence_checker.h"
#include "components/os_crypt/async/browser/key_provider.h"
#include "components/os_crypt/async/common/encryptor.h"
namespace os_crypt_async {
namespace {
std::vector<std::unique_ptr<KeyProvider>> SortProviders(
std::vector<std::pair<OSCryptAsync::Precedence,
std::unique_ptr<KeyProvider>>> input_providers) { … }
}
OSCryptAsync::OSCryptAsync(
std::vector<std::pair<Precedence, std::unique_ptr<KeyProvider>>> providers)
: … { … }
OSCryptAsync::~OSCryptAsync() = default;
void OSCryptAsync::CallbackHelper(InitCallback callback,
Encryptor::Option option) const { … }
void OSCryptAsync::HandleKey(ProviderIterator current,
const std::string& tag,
std::optional<Encryptor::Key> key) { … }
base::CallbackListSubscription OSCryptAsync::GetInstance(
InitCallback callback) { … }
base::CallbackListSubscription OSCryptAsync::GetInstance(
InitCallback callback,
Encryptor::Option option) { … }
}