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

Unified Diff: chromeos/cryptohome/mock_async_method_caller.h

Issue 1693383003: ChromeOS cryptohome should be able to use gaia id as user identifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add cryptohome::Identification() . Created 4 years, 10 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: chromeos/cryptohome/mock_async_method_caller.h
diff --git a/chromeos/cryptohome/mock_async_method_caller.h b/chromeos/cryptohome/mock_async_method_caller.h
index 97ead2fa699efe7099625276ff4e1180b231037b..2a3c3b033f4006a7b1faed17191d87d566331ce8 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:

Powered by Google App Engine
This is Rietveld 408576698