Skip to content

Commit

Permalink
Remove TpmInitStatus signal.
Browse files Browse the repository at this point in the history
We are deprecating tpm-related APIs by cryptohome.

BUG=b:172748724
TEST=build ok.

Change-Id: I21a8ba93549d88b0324f62d33b653cf8d939fd5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2563432
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Commit-Queue: Leo Lai <cylai@google.com>
Cr-Commit-Position: refs/heads/master@{#832811}
  • Loading branch information
Leo Lai authored and Chromium LUCI CQ committed Dec 2, 2020
1 parent e717b89 commit 2cbcc27
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 40 deletions.
21 changes: 0 additions & 21 deletions chromeos/dbus/cryptohome/cryptohome_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -796,12 +796,6 @@ class CryptohomeClientImpl : public CryptohomeClient {
weak_ptr_factory_.GetWeakPtr()),
base::BindOnce(&CryptohomeClientImpl::OnSignalConnected,
weak_ptr_factory_.GetWeakPtr()));
proxy_->ConnectToSignal(
cryptohome::kCryptohomeInterface, cryptohome::kSignalTpmInitStatus,
base::BindRepeating(&CryptohomeClientImpl::TpmInitStatusReceived,
weak_ptr_factory_.GetWeakPtr()),
base::BindOnce(&CryptohomeClientImpl::OnSignalConnected,
weak_ptr_factory_.GetWeakPtr()));
proxy_->ConnectToSignal(
cryptohome::kCryptohomeInterface, cryptohome::kSignalLowDiskSpace,
base::BindRepeating(&CryptohomeClientImpl::LowDiskSpaceReceived,
Expand Down Expand Up @@ -1052,21 +1046,6 @@ class CryptohomeClientImpl : public CryptohomeClient {
observer.AsyncCallStatusWithData(async_id, return_status, return_data);
}

// Handles TpmInitStatus signal.
void TpmInitStatusReceived(dbus::Signal* signal) {
dbus::MessageReader reader(signal);
bool ready = false;
bool owned = false;
bool was_owned_this_boot = false;
if (!reader.PopBool(&ready) || !reader.PopBool(&owned) ||
!reader.PopBool(&was_owned_this_boot)) {
LOG(ERROR) << "Invalid signal: " << signal->ToString();
return;
}
for (auto& observer : observer_list_)
observer.TpmInitStatusUpdated(ready, owned, was_owned_this_boot);
}

// Handles LowDiskSpace signal.
void LowDiskSpaceReceived(dbus::Signal* signal) {
dbus::MessageReader reader(signal);
Expand Down
6 changes: 0 additions & 6 deletions chromeos/dbus/cryptohome/cryptohome_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,6 @@ class COMPONENT_EXPORT(CRYPTOHOME_CLIENT) CryptohomeClient {
bool return_status,
const std::string& data) {}

// Called when TpmInitStatus signal is received, when the status of the TPM
// initialization is changed.
virtual void TpmInitStatusUpdated(bool ready,
bool owned,
bool was_owned_this_boot) {}

// Called when LowDiskSpace signal is received, when the cryptohome
// partition is running out of disk space.
virtual void LowDiskSpace(uint64_t disk_free_bytes) {}
Expand Down
8 changes: 0 additions & 8 deletions chromeos/dbus/cryptohome/fake_cryptohome_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -694,14 +694,6 @@ void FakeCryptohomeClient::NotifyAsyncCallStatusWithData(
observer.AsyncCallStatusWithData(async_id, return_status, data);
}

void FakeCryptohomeClient::NotifyTpmInitStatusUpdated(
bool ready,
bool owned,
bool was_owned_this_boot) {
for (auto& observer : observer_list_)
observer.TpmInitStatusUpdated(ready, owned, was_owned_this_boot);
}

void FakeCryptohomeClient::NotifyDircryptoMigrationProgress(
cryptohome::DircryptoMigrationStatus status,
uint64_t current,
Expand Down
5 changes: 0 additions & 5 deletions chromeos/dbus/cryptohome/fake_cryptohome_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,6 @@ class COMPONENT_EXPORT(CRYPTOHOME_CLIENT) FakeCryptohomeClient
rsu_device_id_ = rsu_device_id;
}

// Calls TpmInitStatusUpdated() on Observer instances.
void NotifyTpmInitStatusUpdated(bool ready,
bool owned,
bool was_owned_this_boot);

// Calls DircryptoMigrationProgress() on Observer instances.
void NotifyDircryptoMigrationProgress(
cryptohome::DircryptoMigrationStatus status,
Expand Down

0 comments on commit 2cbcc27

Please sign in to comment.