Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(442)

Unified Diff: chrome/browser/chromeos/attestation/attestation_policy_observer.cc

Issue 14305009: Enhanced and refactored the AttestationFlow interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/attestation/attestation_policy_observer.cc
diff --git a/chrome/browser/chromeos/attestation/attestation_policy_observer.cc b/chrome/browser/chromeos/attestation/attestation_policy_observer.cc
index 21664cde31c1188311062f51478bc9a4f81ce67d..517a34adb9bbbf0d146d1b4ad1e06861a4cd1dd0 100644
--- a/chrome/browser/chromeos/attestation/attestation_policy_observer.cc
+++ b/chrome/browser/chromeos/attestation/attestation_policy_observer.cc
@@ -143,7 +143,7 @@ void AttestationPolicyObserver::Start() {
base::Bind(&AttestationPolicyObserver::GetNewCertificate,
weak_factory_.GetWeakPtr());
cryptohome_client_->TpmAttestationDoesKeyExist(
- CryptohomeClient::DEVICE_KEY,
+ DEVICE_KEY,
kEnterpriseMachineKey,
base::Bind(DBusBoolRedirectCallback, on_does_exist, on_does_not_exist));
}
@@ -151,7 +151,8 @@ void AttestationPolicyObserver::Start() {
void AttestationPolicyObserver::GetNewCertificate() {
// We can reuse the dbus callback handler logic.
attestation_flow_->GetCertificate(
- kEnterpriseMachineKey,
+ ENTERPRISE_MACHINE_CERTIFICATE,
+ true, // Force a new key to be generated.
base::Bind(DBusStringCallback,
base::Bind(&AttestationPolicyObserver::UploadCertificate,
weak_factory_.GetWeakPtr()),
@@ -160,7 +161,7 @@ void AttestationPolicyObserver::GetNewCertificate() {
void AttestationPolicyObserver::GetExistingCertificate() {
cryptohome_client_->TpmAttestationGetCertificate(
- CryptohomeClient::DEVICE_KEY,
+ DEVICE_KEY,
kEnterpriseMachineKey,
base::Bind(DBusStringCallback,
base::Bind(&AttestationPolicyObserver::CheckCertificateExpiry,

Powered by Google App Engine
This is Rietveld 408576698