Commit 2c50fa52 authored by Omar Morsi's avatar Omar Morsi Committed by Commit Bot

Accept only OnceCallbacks in PlatformKeysService interface

Bug: 1130594
Change-Id: I815675d485a40f7131e48908cd1f25d8f20c74d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2421459Reviewed-by: default avatarPavol Marko <pmarko@chromium.org>
Commit-Queue: Omar Morsi <omorsi@google.com>
Cr-Commit-Position: refs/heads/master@{#809232}
parent 6b2a0e0d
......@@ -57,7 +57,7 @@ CertificateHelperForTesting::~CertificateHelperForTesting() = default;
void CertificateHelperForTesting::GetCertificates(
platform_keys::TokenId token_id,
const platform_keys::GetCertificatesCallback& callback) {
platform_keys::GetCertificatesCallback callback) {
auto result = std::make_unique<net::CertificateList>();
*result = cert_list_;
std::move(callback).Run(std::move(result), platform_keys::Status::kSuccess);
......
......@@ -63,7 +63,7 @@ struct CertificateHelperForTesting {
private:
void GetCertificates(platform_keys::TokenId token_id,
const platform_keys::GetCertificatesCallback& callback);
platform_keys::GetCertificatesCallback callback);
platform_keys::MockPlatformKeysService* platform_keys_service_ = nullptr;
scoped_refptr<net::X509Certificate> template_cert_;
......
......@@ -39,14 +39,14 @@ class MockPlatformKeysService : public PlatformKeysService {
GenerateRSAKey,
(TokenId token_id,
unsigned int modulus_length_bits,
const GenerateKeyCallback& callback),
GenerateKeyCallback callback),
(override));
MOCK_METHOD(void,
GenerateECKey,
(TokenId token_id,
const std::string& named_curve,
const GenerateKeyCallback& callback),
GenerateKeyCallback callback),
(override));
MOCK_METHOD(void,
......@@ -55,7 +55,7 @@ class MockPlatformKeysService : public PlatformKeysService {
const std::string& data,
const std::string& public_key_spki_der,
HashAlgorithm hash_algorithm,
const SignCallback& callback),
SignCallback callback),
(override));
MOCK_METHOD(void,
......@@ -63,7 +63,7 @@ class MockPlatformKeysService : public PlatformKeysService {
(base::Optional<TokenId> token_id,
const std::string& data,
const std::string& public_key_spki_der,
const SignCallback& callback),
SignCallback callback),
(override));
MOCK_METHOD(void,
......@@ -72,18 +72,18 @@ class MockPlatformKeysService : public PlatformKeysService {
const std::string& data,
const std::string& public_key_spki_der,
HashAlgorithm hash_algorithm,
const SignCallback& callback),
SignCallback callback),
(override));
MOCK_METHOD(void,
SelectClientCertificates,
(const std::vector<std::string>& certificate_authorities,
const SelectCertificatesCallback& callback),
SelectCertificatesCallback callback),
(override));
MOCK_METHOD(void,
GetCertificates,
(TokenId token_id, const GetCertificatesCallback& callback),
(TokenId token_id, GetCertificatesCallback callback),
(override));
MOCK_METHOD(void,
......@@ -95,14 +95,14 @@ class MockPlatformKeysService : public PlatformKeysService {
ImportCertificate,
(TokenId token_id,
const scoped_refptr<net::X509Certificate>& certificate,
const ImportCertificateCallback& callback),
ImportCertificateCallback callback),
(override));
MOCK_METHOD(void,
RemoveCertificate,
(TokenId token_id,
const scoped_refptr<net::X509Certificate>& certificate,
const RemoveCertificateCallback& callback),
RemoveCertificateCallback callback),
(override));
MOCK_METHOD(void,
......@@ -117,7 +117,7 @@ class MockPlatformKeysService : public PlatformKeysService {
MOCK_METHOD(void,
GetKeyLocations,
(const std::string& public_key_spki_der,
const GetKeyLocationsCallback& callback),
GetKeyLocationsCallback callback),
(override));
MOCK_METHOD(void,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment