Commit 9c108b62 authored by Leo Lai's avatar Leo Lai Committed by Commit Bot

remove SpyingFakeCryptohomeClient

This class is not necessary anymore because we don't use cryptohome
client to perform attested key deletion.

BUG=b:158955123
TEST=build.

Change-Id: I155bacc851ee27a5c96264230b0169753b17ce31
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2497387
Commit-Queue: Leo Lai <cylai@google.com>
Reviewed-by: default avatarMichael Ershov <miersh@google.com>
Reviewed-by: default avatarPavol Marko <pmarko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821217}
parent 2389811c
......@@ -158,30 +158,5 @@ user_manager::User* ProfileHelperForTesting::GetUser() const {
return user_;
}
//================ SpyingFakeCryptohomeClient ==================================
SpyingFakeCryptohomeClient::SpyingFakeCryptohomeClient() = default;
SpyingFakeCryptohomeClient::~SpyingFakeCryptohomeClient() = default;
void SpyingFakeCryptohomeClient::TpmAttestationDeleteKey(
attestation::AttestationKeyType key_type,
const cryptohome::AccountIdentifier& cryptohome_id,
const std::string& key_prefix,
DBusMethodCallback<bool> callback) {
OnTpmAttestationDeleteKey(key_type, key_prefix);
FakeCryptohomeClient::TpmAttestationDeleteKey(
key_type, cryptohome_id, key_prefix, std::move(callback));
}
void SpyingFakeCryptohomeClient::TpmAttestationDeleteKeysByPrefix(
attestation::AttestationKeyType key_type,
const cryptohome::AccountIdentifier& cryptohome_id,
const std::string& key_prefix,
DBusMethodCallback<bool> callback) {
OnTpmAttestationDeleteKeysByPrefix(key_type, key_prefix);
FakeCryptohomeClient::TpmAttestationDeleteKeysByPrefix(
key_type, cryptohome_id, key_prefix, std::move(callback));
}
} // namespace cert_provisioning
} // namespace chromeos
......@@ -11,7 +11,6 @@
#include "chrome/browser/chromeos/platform_keys/mock_platform_keys_service.h"
#include "chrome/browser/chromeos/platform_keys/platform_keys.h"
#include "chrome/test/base/testing_profile_manager.h"
#include "chromeos/dbus/cryptohome/fake_cryptohome_client.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace user_manager {
......@@ -93,39 +92,6 @@ class ProfileHelperForTesting {
user_manager::User* user_ = nullptr;
};
//================ SpyingFakeCryptohomeClient ==================================
class SpyingFakeCryptohomeClient : public FakeCryptohomeClient {
public:
SpyingFakeCryptohomeClient();
SpyingFakeCryptohomeClient(const SpyingFakeCryptohomeClient&) = delete;
SpyingFakeCryptohomeClient& operator=(const SpyingFakeCryptohomeClient&) =
delete;
~SpyingFakeCryptohomeClient() override;
void TpmAttestationDeleteKey(
attestation::AttestationKeyType key_type,
const cryptohome::AccountIdentifier& cryptohome_id,
const std::string& key_prefix,
DBusMethodCallback<bool> callback) override;
void TpmAttestationDeleteKeysByPrefix(
attestation::AttestationKeyType key_type,
const cryptohome::AccountIdentifier& cryptohome_id,
const std::string& key_prefix,
DBusMethodCallback<bool> callback) override;
MOCK_METHOD(void,
OnTpmAttestationDeleteKey,
(attestation::AttestationKeyType key_type,
const std::string& key_prefix));
MOCK_METHOD(void,
OnTpmAttestationDeleteKeysByPrefix,
(attestation::AttestationKeyType key_type,
const std::string& key_prefix));
};
} // namespace cert_provisioning
} // namespace chromeos
......
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