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

Unified Diff: chromeos/dbus/fake_cryptohome_client.h

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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/dbus/fake_cryptohome_client.h
diff --git a/chromeos/dbus/fake_cryptohome_client.h b/chromeos/dbus/fake_cryptohome_client.h
index 7064a2ee7c8c23c5b61ead527a72728a2a213774..177336281117274ef1275b0736cee830b5a7b2e0 100644
--- a/chromeos/dbus/fake_cryptohome_client.h
+++ b/chromeos/dbus/fake_cryptohome_client.h
@@ -27,25 +27,25 @@ class CHROMEOS_EXPORT FakeCryptohomeClient : public CryptohomeClient {
const WaitForServiceToBeAvailableCallback& callback) override;
void IsMounted(const BoolDBusMethodCallback& callback) override;
bool Unmount(bool* success) override;
- void AsyncCheckKey(const std::string& username,
+ void AsyncCheckKey(const user_manager::UserID& user_id,
const std::string& key,
const AsyncMethodCallback& callback) override;
- void AsyncMigrateKey(const std::string& username,
+ void AsyncMigrateKey(const user_manager::UserID& user_id,
const std::string& from_key,
const std::string& to_key,
const AsyncMethodCallback& callback) override;
- void AsyncRemove(const std::string& username,
+ void AsyncRemove(const user_manager::UserID& user_id,
const AsyncMethodCallback& callback) override;
void GetSystemSalt(const GetSystemSaltCallback& callback) override;
- void GetSanitizedUsername(const std::string& username,
+ void GetSanitizedUsername(const user_manager::UserID& user_id,
const StringDBusMethodCallback& callback) override;
std::string BlockingGetSanitizedUsername(
- const std::string& username) override;
- void AsyncMount(const std::string& username,
+ const user_manager::UserID& user_id) override;
+ void AsyncMount(const user_manager::UserID& user_id,
const std::string& key,
int flags,
const AsyncMethodCallback& callback) override;
- void AsyncAddKey(const std::string& username,
+ void AsyncAddKey(const user_manager::UserID& user_id,
const std::string& key,
const std::string& new_key,
const AsyncMethodCallback& callback) override;
@@ -68,7 +68,7 @@ class CHROMEOS_EXPORT FakeCryptohomeClient : public CryptohomeClient {
void Pkcs11GetTpmTokenInfo(
const Pkcs11GetTpmTokenInfoCallback& callback) override;
void Pkcs11GetTpmTokenInfoForUser(
- const std::string& username,
+ const user_manager::UserID& user_id,
const Pkcs11GetTpmTokenInfoCallback& callback) override;
bool InstallAttributesGet(const std::string& name,
std::vector<uint8>* value,
@@ -94,36 +94,36 @@ class CHROMEOS_EXPORT FakeCryptohomeClient : public CryptohomeClient {
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) override;
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) override;
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) override;
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) override;
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) override;
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) override;
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,
@@ -132,23 +132,23 @@ class CHROMEOS_EXPORT FakeCryptohomeClient : public CryptohomeClient {
const AsyncMethodCallback& callback) override;
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) override;
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) override;
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) override;
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) override;
void GetKeyDataEx(const cryptohome::AccountIdentifier& id,

Powered by Google App Engine
This is Rietveld 408576698