mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2025-02-21 17:33:19 +03:00
28 lines
754 B
Plaintext
28 lines
754 B
Plaintext
|
// Copyright 2024 The Chromium Authors
|
||
|
// Use of this source code is governed by a BSD-style license that can be
|
||
|
// found in the LICENSE file.
|
||
|
|
||
|
#include "crypto/scoped_fake_apple_keychain_v2.h"
|
||
|
|
||
|
#include <memory>
|
||
|
|
||
|
#include "crypto/fake_apple_keychain_v2.h"
|
||
|
|
||
|
namespace crypto {
|
||
|
|
||
|
ScopedFakeAppleKeychainV2::ScopedFakeAppleKeychainV2(
|
||
|
const std::string& keychain_access_group)
|
||
|
: keychain_(std::make_unique<FakeAppleKeychainV2>(keychain_access_group)) {
|
||
|
AppleKeychainV2::SetInstanceOverride(keychain_.get());
|
||
|
}
|
||
|
|
||
|
ScopedFakeAppleKeychainV2::~ScopedFakeAppleKeychainV2() {
|
||
|
AppleKeychainV2::ClearInstanceOverride();
|
||
|
}
|
||
|
|
||
|
void ScopedFakeAppleKeychainV2::SetUVMethod(UVMethod uv_method) {
|
||
|
keychain_->set_uv_method(uv_method);
|
||
|
}
|
||
|
|
||
|
} // namespace crypto
|