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

Unified Diff: chromeos/attestation/attestation_flow.cc

Issue 27044004: Added multi-profile support for attestation on chromeos. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 2 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
« no previous file with comments | « chromeos/attestation/attestation_flow.h ('k') | chromeos/attestation/attestation_flow_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/attestation/attestation_flow.cc
diff --git a/chromeos/attestation/attestation_flow.cc b/chromeos/attestation/attestation_flow.cc
index 9b22b659f54f6c934441eef92b50b040420bfa0b..5021ddf258684002ba303993f35ab2ba0f061cdb 100644
--- a/chromeos/attestation/attestation_flow.cc
+++ b/chromeos/attestation/attestation_flow.cc
@@ -96,7 +96,7 @@ AttestationFlow::~AttestationFlow() {
void AttestationFlow::GetCertificate(
AttestationCertificateProfile certificate_profile,
- const std::string& user_email,
+ const std::string& user_id,
const std::string& request_origin,
bool force_new_key,
const CertificateCallback& callback) {
@@ -106,7 +106,7 @@ void AttestationFlow::GetCertificate(
&AttestationFlow::StartCertificateRequest,
weak_factory_.GetWeakPtr(),
certificate_profile,
- user_email,
+ user_id,
request_origin,
force_new_key,
callback);
@@ -191,7 +191,7 @@ void AttestationFlow::OnEnrollComplete(const base::Closure& on_failure,
void AttestationFlow::StartCertificateRequest(
AttestationCertificateProfile certificate_profile,
- const std::string& user_email,
+ const std::string& user_id,
const std::string& request_origin,
bool generate_new_key,
const CertificateCallback& callback) {
@@ -202,11 +202,12 @@ void AttestationFlow::StartCertificateRequest(
// Get the attestation service to create a Privacy CA certificate request.
async_caller_->AsyncTpmAttestationCreateCertRequest(
certificate_profile,
- user_email,
+ user_id,
request_origin,
base::Bind(&AttestationFlow::SendCertificateRequestToPCA,
weak_factory_.GetWeakPtr(),
key_type,
+ user_id,
key_name,
callback));
} else {
@@ -215,6 +216,7 @@ void AttestationFlow::StartCertificateRequest(
&AttestationFlow::GetExistingCertificate,
weak_factory_.GetWeakPtr(),
key_type,
+ user_id,
key_name,
callback);
// If the key does not exist, call this method back with |generate_new_key|
@@ -223,12 +225,13 @@ void AttestationFlow::StartCertificateRequest(
&AttestationFlow::StartCertificateRequest,
weak_factory_.GetWeakPtr(),
certificate_profile,
- user_email,
+ user_id,
request_origin,
true,
callback);
cryptohome_client_->TpmAttestationDoesKeyExist(
key_type,
+ user_id,
key_name,
base::Bind(&DBusBoolRedirectCallback,
on_key_exists,
@@ -239,6 +242,7 @@ void AttestationFlow::StartCertificateRequest(
void AttestationFlow::SendCertificateRequestToPCA(
AttestationKeyType key_type,
+ const std::string& user_id,
const std::string& key_name,
const CertificateCallback& callback,
bool success,
@@ -256,12 +260,14 @@ void AttestationFlow::SendCertificateRequestToPCA(
base::Bind(&AttestationFlow::SendCertificateResponseToDaemon,
weak_factory_.GetWeakPtr(),
key_type,
+ user_id,
key_name,
callback));
}
void AttestationFlow::SendCertificateResponseToDaemon(
AttestationKeyType key_type,
+ const std::string& user_id,
const std::string& key_name,
const CertificateCallback& callback,
bool success,
@@ -276,16 +282,19 @@ void AttestationFlow::SendCertificateResponseToDaemon(
// Forward the response to the attestation service to complete the operation.
async_caller_->AsyncTpmAttestationFinishCertRequest(data,
key_type,
+ user_id,
key_name,
base::Bind(callback));
}
void AttestationFlow::GetExistingCertificate(
AttestationKeyType key_type,
+ const std::string& user_id,
const std::string& key_name,
const CertificateCallback& callback) {
cryptohome_client_->TpmAttestationGetCertificate(
key_type,
+ user_id,
key_name,
base::Bind(&DBusDataMethodCallback, callback));
}
« no previous file with comments | « chromeos/attestation/attestation_flow.h ('k') | chromeos/attestation/attestation_flow_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698