diff options
author | alemate <alemate@chromium.org> | 2016-03-04 02:39:54 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-04 10:41:09 +0000 |
commit | 627f65303a4a1a6b4d1beb62c9ea5b6ed5affda7 (patch) | |
tree | 5b57e0a8999752be8165706373ba5abfe5851729 /chromeos/cryptohome/mock_async_method_caller.h | |
parent | 0cdae918ae7ffe4d4046027182807b9d99b6b719 (diff) | |
download | chromium_src-627f65303a4a1a6b4d1beb62c9ea5b6ed5affda7.zip chromium_src-627f65303a4a1a6b4d1beb62c9ea5b6ed5affda7.tar.gz chromium_src-627f65303a4a1a6b4d1beb62c9ea5b6ed5affda7.tar.bz2 |
ChromeOS cryptohome should be able to use gaia id as user identifier.
This CL adds support for using Gaia ID as cryptohome identifier.
BUG=462823
TEST=unit tests
Review URL: https://codereview.chromium.org/1693383003
Cr-Commit-Position: refs/heads/master@{#379262}
Diffstat (limited to 'chromeos/cryptohome/mock_async_method_caller.h')
-rw-r--r-- | chromeos/cryptohome/mock_async_method_caller.h | 75 |
1 files changed, 40 insertions, 35 deletions
diff --git a/chromeos/cryptohome/mock_async_method_caller.h b/chromeos/cryptohome/mock_async_method_caller.h index 97ead2f..2a3c3b0 100644 --- a/chromeos/cryptohome/mock_async_method_caller.h +++ b/chromeos/cryptohome/mock_async_method_caller.h @@ -10,6 +10,7 @@ #include "base/callback.h" #include "base/macros.h" #include "chromeos/cryptohome/async_method_caller.h" +#include "chromeos/cryptohome/cryptohome_parameters.h" #include "testing/gmock/include/gmock/gmock.h" namespace cryptohome { @@ -27,27 +28,32 @@ class MockAsyncMethodCaller : public AsyncMethodCaller { void SetUp(bool success, MountError return_code); - MOCK_METHOD3(AsyncCheckKey, void(const std::string& user_email, - const std::string& passhash, - Callback callback)); - MOCK_METHOD4(AsyncMigrateKey, void(const std::string& user_email, - const std::string& old_hash, - const std::string& new_hash, - Callback callback)); - MOCK_METHOD4(AsyncMount, void(const std::string& user_email, - const std::string& passhash, - int flags, - Callback callback)); - MOCK_METHOD4(AsyncAddKey, void(const std::string& user_email, - const std::string& passhash, - const std::string& new_key, - Callback callback)); + MOCK_METHOD3(AsyncCheckKey, + void(const Identification& user_id, + const std::string& passhash, + Callback callback)); + MOCK_METHOD4(AsyncMigrateKey, + void(const Identification& user_id, + const std::string& old_hash, + const std::string& new_hash, + Callback callback)); + MOCK_METHOD4(AsyncMount, + void(const Identification& user_id, + const std::string& passhash, + int flags, + Callback callback)); + MOCK_METHOD4(AsyncAddKey, + void(const Identification& user_id, + const std::string& passhash, + const std::string& new_key, + Callback callback)); MOCK_METHOD1(AsyncMountGuest, void(Callback callback)); - MOCK_METHOD3(AsyncMountPublic, void(const std::string& public_mount_id, - int flags, - Callback callback)); - MOCK_METHOD2(AsyncRemove, void(const std::string& user_email, - Callback callback)); + MOCK_METHOD3(AsyncMountPublic, + void(const Identification& public_mount_id, + int flags, + Callback callback)); + MOCK_METHOD2(AsyncRemove, + void(const Identification& user_id, Callback callback)); MOCK_METHOD2(AsyncTpmAttestationCreateEnrollRequest, void(chromeos::attestation::PrivacyCAType pca_type, const DataCallback& callback)); @@ -59,38 +65,37 @@ class MockAsyncMethodCaller : public AsyncMethodCaller { AsyncTpmAttestationCreateCertRequest, void(chromeos::attestation::PrivacyCAType pca_type, chromeos::attestation::AttestationCertificateProfile profile, - const std::string& user_id, + const Identification& user_id, const std::string& request_origin, const DataCallback& callback)); MOCK_METHOD5(AsyncTpmAttestationFinishCertRequest, void(const std::string& pca_response, chromeos::attestation::AttestationKeyType key_type, - const std::string& user_id, + const Identification& user_id, const std::string& key_name, const DataCallback& callback)); MOCK_METHOD4(TpmAttestationRegisterKey, void(chromeos::attestation::AttestationKeyType key_type, - const std::string& user_id, + const Identification& user_id, const std::string& key_name, const Callback& callback)); - MOCK_METHOD8( - TpmAttestationSignEnterpriseChallenge, - void(chromeos::attestation::AttestationKeyType key_type, - const std::string& user_id, - const std::string& key_name, - const std::string& domain, - const std::string& device_id, - chromeos::attestation::AttestationChallengeOptions options, - const std::string& challenge, - const DataCallback& callback)); + MOCK_METHOD8(TpmAttestationSignEnterpriseChallenge, + void(chromeos::attestation::AttestationKeyType key_type, + const Identification& user_id, + const std::string& key_name, + const std::string& domain, + const std::string& device_id, + chromeos::attestation::AttestationChallengeOptions options, + const std::string& challenge, + const DataCallback& callback)); MOCK_METHOD5(TpmAttestationSignSimpleChallenge, void(chromeos::attestation::AttestationKeyType key_type, - const std::string& user_id, + const Identification& user_id, const std::string& key_name, const std::string& challenge, const DataCallback& callback)); MOCK_METHOD2(AsyncGetSanitizedUsername, - void(const std::string& user, + void(const Identification& user_id, const DataCallback& callback)); private: |