Commit a6ff22fd authored by Leo Lai's avatar Leo Lai Committed by Commit Bot

remove TpmAttestationIsEnrolled APIs

Now we are using AttestationClient directly instead of passing through
CryptohomeClient.

BUG=b:158955123
TEST=build ok.

Change-Id: I38e0cb370cfeb93a4388d62c09040faf4203af58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2467639
Commit-Queue: Leo Lai <cylai@google.com>
Reviewed-by: default avatarMaksim Ivanov <emaxx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821628}
parent 54ca1eff
......@@ -481,14 +481,6 @@ class CryptohomeClientImpl : public CryptohomeClient {
return CallBoolMethodAndBlock(&method_call, is_first_install);
}
// CryptohomeClient override.
void TpmAttestationIsEnrolled(DBusMethodCallback<bool> callback) override {
dbus::MethodCall method_call(
cryptohome::kCryptohomeInterface,
cryptohome::kCryptohomeTpmIsAttestationEnrolled);
return CallBoolMethod(&method_call, std::move(callback));
}
// CryptohomeClient override.
void AsyncTpmAttestationCreateEnrollRequest(
attestation::PrivacyCAType pca_type,
......
......@@ -316,10 +316,6 @@ class COMPONENT_EXPORT(CRYPTOHOME_CLIENT) CryptohomeClient {
// succeeds. This method blocks until the call returns.
virtual bool InstallAttributesIsFirstInstall(bool* is_first_install) = 0;
// Calls the TpmAttestationIsEnrolled dbus method. The callback is called
// when the operation completes.
virtual void TpmAttestationIsEnrolled(DBusMethodCallback<bool> callback) = 0;
// Asynchronously creates an attestation enrollment request. The callback
// will be called when the dbus call completes. When the operation completes,
// the AsyncCallStatusWithDataHandler signal handler is called. The data that
......
......@@ -332,15 +332,6 @@ bool FakeCryptohomeClient::InstallAttributesIsFirstInstall(
return true;
}
void FakeCryptohomeClient::TpmAttestationIsEnrolled(
DBusMethodCallback<bool> callback) {
auto result = service_is_available_
? base::make_optional(tpm_attestation_is_enrolled_)
: base::nullopt;
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::BindOnce(std::move(callback), result));
}
void FakeCryptohomeClient::AsyncTpmAttestationCreateEnrollRequest(
chromeos::attestation::PrivacyCAType pca_type,
AsyncMethodCallback callback) {
......
......@@ -99,7 +99,6 @@ class COMPONENT_EXPORT(CRYPTOHOME_CLIENT) FakeCryptohomeClient
void InstallAttributesIsReady(DBusMethodCallback<bool> callback) override;
bool InstallAttributesIsInvalid(bool* is_invalid) override;
bool InstallAttributesIsFirstInstall(bool* is_first_install) override;
void TpmAttestationIsEnrolled(DBusMethodCallback<bool> callback) override;
void AsyncTpmAttestationCreateEnrollRequest(
chromeos::attestation::PrivacyCAType pca_type,
AsyncMethodCallback callback) override;
......@@ -289,10 +288,6 @@ class COMPONENT_EXPORT(CRYPTOHOME_CLIENT) FakeCryptohomeClient
cryptohome_error_ = error;
}
void set_tpm_attestation_is_enrolled(bool enrolled) {
tpm_attestation_is_enrolled_ = enrolled;
}
void set_tpm_attestation_does_key_exist_should_succeed(bool should_succeed) {
tpm_attestation_does_key_exist_should_succeed_ = should_succeed;
}
......@@ -450,7 +445,6 @@ class COMPONENT_EXPORT(CRYPTOHOME_CLIENT) FakeCryptohomeClient
bool needs_dircrypto_migration_ = false;
bool run_default_dircrypto_migration_ = true;
bool tpm_attestation_is_enrolled_ = true;
bool tpm_attestation_does_key_exist_should_succeed_ = true;
bool supports_low_entropy_credentials_ = false;
// Controls if CheckKeyEx actually checks the key.
......
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