Chromium Code Reviews| Index: chromeos/dbus/cryptohome_client.h |
| diff --git a/chromeos/dbus/cryptohome_client.h b/chromeos/dbus/cryptohome_client.h |
| index 09116e3a05d63724c8c7c080335f1f23e9b795d5..95d9f880eb7a8cbd2dc5a7daa625cdd9fa5b35d5 100644 |
| --- a/chromeos/dbus/cryptohome_client.h |
| +++ b/chromeos/dbus/cryptohome_client.h |
| @@ -29,6 +29,7 @@ class GetBootAttributeRequest; |
| class GetKeyDataRequest; |
| class MountRequest; |
| class RemoveKeyRequest; |
| +class RenameRequest; |
| class SetBootAttributeRequest; |
| class UpdateKeyRequest; |
| @@ -137,6 +138,12 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { |
| virtual void AsyncRemove(const std::string& username, |
| const AsyncMethodCallback& callback) = 0; |
| + // Calls RenameCryptohome method. |callback| is called after the method |
| + // call succeeds. |
| + virtual void RenameCryptohome(const cryptohome::AccountIdentifier& id_from, |
| + const cryptohome::AccountIdentifier& id_to, |
| + const ProtobufMethodCallback& callback) = 0; |
| + |
| // Calls GetSystemSalt method. |callback| is called after the method call |
| // succeeds. |
| virtual void GetSystemSalt(const GetSystemSaltCallback& callback) = 0; |
| @@ -241,11 +248,10 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { |
| const Pkcs11GetTpmTokenInfoCallback& callback) = 0; |
| // Calls Pkcs11GetTpmTokenInfoForUser method. On success |callback| will |
| - // receive PKCS #11 token information for the user identified by |user_email|. |
| - // The |user_email| must be a canonical email address as returned by |
| - // user_manager::User::email(). |
| + // receive PKCS #11 token information for the user identified by |user_id|. |
| + // The |user_id| must be a valid cryptohome user id. |
|
Darren Krahn
2016/02/17 20:48:05
Please clarify what is a 'valid cryptohome user id
Alexander Alekseev
2016/02/18 13:45:15
This is now replaced with cryptohome::Identificati
|
| virtual void Pkcs11GetTpmTokenInfoForUser( |
| - const std::string& user_email, |
| + const std::string& user_id, |
| const Pkcs11GetTpmTokenInfoCallback& callback) = 0; |
| // Calls InstallAttributesGet method and returns true when the call succeeds. |
| @@ -332,7 +338,7 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { |
| // |key_type| determines whether the certified key is to be associated with |
| // the current user. |key_name| is a name for the key. If |key_type| is |
| // KEY_USER, a |user_id| must be provided. Otherwise |user_id| is ignored. |
| - // For normal GAIA users the |user_id| is a canonical email address. |
| + // The |user_id| must be a valid cryptohome user id. |
| virtual void AsyncTpmAttestationFinishCertRequest( |
| const std::string& pca_response, |
| attestation::AttestationKeyType key_type, |
| @@ -343,8 +349,8 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { |
| // Checks if an attestation key already exists. If the key specified by |
| // |key_type| and |key_name| exists, then the result sent to the callback will |
| // be true. If |key_type| is KEY_USER, a |user_id| must be provided. |
| - // Otherwise |user_id| is ignored. For normal GAIA users the |user_id| is a |
| - // canonical email address. |
| + // Otherwise |user_id| is ignored. |
| + // The |user_id| must be a valid cryptohome user id. |
| virtual void TpmAttestationDoesKeyExist( |
| attestation::AttestationKeyType key_type, |
| const std::string& user_id, |
| @@ -355,8 +361,8 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { |
| // |key_name|. |callback| will be called when the operation completes. If |
| // the key does not exist the callback |result| parameter will be false. If |
| // |key_type| is KEY_USER, a |user_id| must be provided. Otherwise |user_id| |
| - // is ignored. For normal GAIA users the |user_id| is a canonical email |
| - // address. |
| + // is ignored. |
| + // The |user_id| must be a valid cryptohome user id. |
| virtual void TpmAttestationGetCertificate( |
| attestation::AttestationKeyType key_type, |
| const std::string& user_id, |
| @@ -367,7 +373,7 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { |
| // |callback| will be called when the operation completes. If the key does |
| // not exist the callback |result| parameter will be false. If |key_type| is |
| // KEY_USER, a |user_id| must be provided. Otherwise |user_id| is ignored. |
| - // For normal GAIA users the |user_id| is a canonical email address. |
| + // The |user_id| must be a valid cryptohome user id. |
| virtual void TpmAttestationGetPublicKey( |
| attestation::AttestationKeyType key_type, |
| const std::string& user_id, |
| @@ -379,8 +385,8 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { |
| // completes. When the operation completes, the AsyncCallStatusHandler signal |
| // handler is called. |key_type| and |key_name| specify the key to register. |
| // If |key_type| is KEY_USER, a |user_id| must be provided. Otherwise |
| - // |user_id| is ignored. For normal GAIA users the |user_id| is a canonical |
| - // email address. |
| + // |user_id| is ignored. |
| + // The |user_id| must be a valid cryptohome user id. |
| virtual void TpmAttestationRegisterKey( |
| attestation::AttestationKeyType key_type, |
| const std::string& user_id, |
| @@ -394,8 +400,8 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { |
| // The |callback| will be called when the dbus call completes. When the |
| // operation completes, the AsyncCallStatusWithDataHandler signal handler is |
| // called. If |key_type| is KEY_USER, a |user_id| must be provided. |
| - // Otherwise |user_id| is ignored. For normal GAIA users the |user_id| is a |
| - // canonical email address. |
| + // Otherwise |user_id| is ignored. |
| + // The |user_id| must be a valid cryptohome user id. |
| virtual void TpmAttestationSignEnterpriseChallenge( |
| attestation::AttestationKeyType key_type, |
| const std::string& user_id, |
| @@ -413,7 +419,7 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { |
| // the dbus call completes. When the operation completes, the |
| // AsyncCallStatusWithDataHandler signal handler is called. If |key_type| is |
| // KEY_USER, a |user_id| must be provided. Otherwise |user_id| is ignored. |
| - // For normal GAIA users the |user_id| is a canonical email address. |
| + // The |user_id| must be a valid cryptohome user id. |
| virtual void TpmAttestationSignSimpleChallenge( |
| attestation::AttestationKeyType key_type, |
| const std::string& user_id, |
| @@ -427,7 +433,7 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { |
| // If no payload has been set for the key the callback |result| parameter will |
| // be true and the |data| parameter will be empty. If |key_type| is |
| // KEY_USER, a |user_id| must be provided. Otherwise |user_id| is ignored. |
| - // For normal GAIA users the |user_id| is a canonical email address. |
| + // The |user_id| must be a valid cryptohome user id. |
| virtual void TpmAttestationGetKeyPayload( |
| attestation::AttestationKeyType key_type, |
| const std::string& user_id, |
| @@ -438,8 +444,8 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { |
| // |key_name|. The |callback| will be called when the operation completes. |
| // If the operation succeeds, the callback |result| parameter will be true. |
| // If |key_type| is KEY_USER, a |user_id| must be provided. Otherwise |
| - // |user_id| is ignored. For normal GAIA users the |user_id| is a canonical |
| - // email address. |
| + // |user_id| is ignored. |
| + // The |user_id| must be a valid cryptohome user id. |
| virtual void TpmAttestationSetKeyPayload( |
| attestation::AttestationKeyType key_type, |
| const std::string& user_id, |
| @@ -451,7 +457,7 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { |
| // |callback| will be called when the operation completes. If the operation |
| // succeeds, the callback |result| parameter will be true. If |key_type| is |
| // KEY_USER, a |user_id| must be provided. Otherwise |user_id| is ignored. |
| - // For normal GAIA users the |user_id| is a canonical email address. All keys |
| + // The |user_id| must be a valid cryptohome user id. All keys |
| // where the key name has a prefix matching |key_prefix| will be deleted. All |
| // meta-data associated with the key, including certificates, will also be |
| // deleted. |