| Index: chromeos/dbus/cryptohome_client.h
|
| diff --git a/chromeos/dbus/cryptohome_client.h b/chromeos/dbus/cryptohome_client.h
|
| index 8f9a5dc433f05b945b1b6e265755924fb763c9aa..8b02b5510ffc6e84675e9924a64fa9cc9b191578 100644
|
| --- a/chromeos/dbus/cryptohome_client.h
|
| +++ b/chromeos/dbus/cryptohome_client.h
|
| @@ -32,6 +32,10 @@ class UpdateKeyRequest;
|
|
|
| } // namespace cryptohome
|
|
|
| +namespace user_manager {
|
| +class UserID;
|
| +} // namespace user_manager
|
| +
|
| namespace chromeos {
|
|
|
| // CryptohomeClient is used to communicate with the Cryptohome service.
|
| @@ -93,7 +97,7 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
|
| static CryptohomeClient* Create();
|
|
|
| // Returns the sanitized |username| that the stub implementation would return.
|
| - static std::string GetStubSanitizedUsername(const std::string& username);
|
| + static std::string GetStubSanitizedUsername(const user_manager::UserID& user_id);
|
|
|
| // Sets AsyncCallStatus signal handlers.
|
| // |handler| is called when results for AsyncXXX methods are returned.
|
| @@ -119,20 +123,20 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
|
|
|
| // Calls AsyncCheckKey method. |callback| is called after the method call
|
| // succeeds.
|
| - virtual void AsyncCheckKey(const std::string& username,
|
| + virtual void AsyncCheckKey(const user_manager::UserID& user_id,
|
| const std::string& key,
|
| const AsyncMethodCallback& callback) = 0;
|
|
|
| // Calls AsyncMigrateKey method. |callback| is called after the method call
|
| // succeeds.
|
| - virtual void AsyncMigrateKey(const std::string& username,
|
| + virtual void AsyncMigrateKey(const user_manager::UserID& user_id,
|
| const std::string& from_key,
|
| const std::string& to_key,
|
| const AsyncMethodCallback& callback) = 0;
|
|
|
| // Calls AsyncRemove method. |callback| is called after the method call
|
| // succeeds.
|
| - virtual void AsyncRemove(const std::string& username,
|
| + virtual void AsyncRemove(const user_manager::UserID& user_id,
|
| const AsyncMethodCallback& callback) = 0;
|
|
|
| // Calls GetSystemSalt method. |callback| is called after the method call
|
| @@ -142,7 +146,7 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
|
| // Calls GetSanitizedUsername method. |callback| is called after the method
|
| // call succeeds.
|
| virtual void GetSanitizedUsername(
|
| - const std::string& username,
|
| + const user_manager::UserID& user_id,
|
| const StringDBusMethodCallback& callback) = 0;
|
|
|
| // Same as GetSanitizedUsername() but blocks until a reply is received, and
|
| @@ -152,13 +156,13 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
|
| // considered acceptable (e.g. restarting the browser after a crash or after
|
| // a flag change).
|
| virtual std::string BlockingGetSanitizedUsername(
|
| - const std::string& username) = 0;
|
| + const user_manager::UserID& user_id) = 0;
|
|
|
| // Calls the AsyncMount method to asynchronously mount the cryptohome for
|
| - // |username|, using |key| to unlock it. For supported |flags|, see the
|
| + // |user_id|, using |key| to unlock it. For supported |flags|, see the
|
| // documentation of AsyncMethodCaller::AsyncMount().
|
| // |callback| is called after the method call succeeds.
|
| - virtual void AsyncMount(const std::string& username,
|
| + virtual void AsyncMount(const user_manager::UserID& user_id,
|
| const std::string& key,
|
| int flags,
|
| const AsyncMethodCallback& callback) = 0;
|
| @@ -166,7 +170,7 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
|
| // Calls the AsyncAddKey method to asynchronously add another |new_key| for
|
| // |username|, using |key| to unlock it first.
|
| // |callback| is called after the method call succeeds.
|
| - virtual void AsyncAddKey(const std::string& username,
|
| + virtual void AsyncAddKey(const user_manager::UserID& user_id,
|
| const std::string& key,
|
| const std::string& new_key,
|
| const AsyncMethodCallback& callback) = 0;
|
| @@ -243,7 +247,7 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
|
| // The |user_email| must be a canonical email address as returned by
|
| // user_manager::User::email().
|
| virtual void Pkcs11GetTpmTokenInfoForUser(
|
| - const std::string& user_email,
|
| + const user_manager::UserID& user_id,
|
| const Pkcs11GetTpmTokenInfoCallback& callback) = 0;
|
|
|
| // Calls InstallAttributesGet method and returns true when the call succeeds.
|
| @@ -318,7 +322,7 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
|
| virtual void AsyncTpmAttestationCreateCertRequest(
|
| chromeos::attestation::PrivacyCAType pca_type,
|
| attestation::AttestationCertificateProfile certificate_profile,
|
| - const std::string& user_id,
|
| + const user_manager::UserID& user_id,
|
| const std::string& request_origin,
|
| const AsyncMethodCallback& callback) = 0;
|
|
|
| @@ -334,7 +338,7 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
|
| virtual void AsyncTpmAttestationFinishCertRequest(
|
| const std::string& pca_response,
|
| attestation::AttestationKeyType key_type,
|
| - const std::string& user_id,
|
| + const user_manager::UserID& user_id,
|
| const std::string& key_name,
|
| const AsyncMethodCallback& callback) = 0;
|
|
|
| @@ -345,7 +349,7 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
|
| // canonical email address.
|
| virtual void TpmAttestationDoesKeyExist(
|
| attestation::AttestationKeyType key_type,
|
| - const std::string& user_id,
|
| + const user_manager::UserID& user_id,
|
| const std::string& key_name,
|
| const BoolDBusMethodCallback& callback) = 0;
|
|
|
| @@ -357,7 +361,7 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
|
| // address.
|
| virtual void TpmAttestationGetCertificate(
|
| attestation::AttestationKeyType key_type,
|
| - const std::string& user_id,
|
| + const user_manager::UserID& user_id,
|
| const std::string& key_name,
|
| const DataMethodCallback& callback) = 0;
|
|
|
| @@ -368,7 +372,7 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
|
| // For normal GAIA users the |user_id| is a canonical email address.
|
| virtual void TpmAttestationGetPublicKey(
|
| attestation::AttestationKeyType key_type,
|
| - const std::string& user_id,
|
| + const user_manager::UserID& user_id,
|
| const std::string& key_name,
|
| const DataMethodCallback& callback) = 0;
|
|
|
| @@ -381,7 +385,7 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
|
| // email address.
|
| virtual void TpmAttestationRegisterKey(
|
| attestation::AttestationKeyType key_type,
|
| - const std::string& user_id,
|
| + const user_manager::UserID& user_id,
|
| const std::string& key_name,
|
| const AsyncMethodCallback& callback) = 0;
|
|
|
| @@ -396,7 +400,7 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
|
| // canonical email address.
|
| virtual void TpmAttestationSignEnterpriseChallenge(
|
| attestation::AttestationKeyType key_type,
|
| - const std::string& user_id,
|
| + const user_manager::UserID& user_id,
|
| const std::string& key_name,
|
| const std::string& domain,
|
| const std::string& device_id,
|
| @@ -414,7 +418,7 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
|
| // For normal GAIA users the |user_id| is a canonical email address.
|
| virtual void TpmAttestationSignSimpleChallenge(
|
| attestation::AttestationKeyType key_type,
|
| - const std::string& user_id,
|
| + const user_manager::UserID& user_id,
|
| const std::string& key_name,
|
| const std::string& challenge,
|
| const AsyncMethodCallback& callback) = 0;
|
| @@ -428,7 +432,7 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
|
| // For normal GAIA users the |user_id| is a canonical email address.
|
| virtual void TpmAttestationGetKeyPayload(
|
| attestation::AttestationKeyType key_type,
|
| - const std::string& user_id,
|
| + const user_manager::UserID& user_id,
|
| const std::string& key_name,
|
| const DataMethodCallback& callback) = 0;
|
|
|
| @@ -440,7 +444,7 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
|
| // email address.
|
| virtual void TpmAttestationSetKeyPayload(
|
| attestation::AttestationKeyType key_type,
|
| - const std::string& user_id,
|
| + const user_manager::UserID& user_id,
|
| const std::string& key_name,
|
| const std::string& payload,
|
| const BoolDBusMethodCallback& callback) = 0;
|
| @@ -455,7 +459,7 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
|
| // deleted.
|
| virtual void TpmAttestationDeleteKeys(
|
| attestation::AttestationKeyType key_type,
|
| - const std::string& user_id,
|
| + const user_manager::UserID& user_id,
|
| const std::string& key_prefix,
|
| const BoolDBusMethodCallback& callback) = 0;
|
|
|
|
|