| Index: chromeos/cryptohome/async_method_caller.cc
|
| diff --git a/chromeos/cryptohome/async_method_caller.cc b/chromeos/cryptohome/async_method_caller.cc
|
| index 8348fd26f992fe4b70e6dc4665fcb70f5d968386..56ec8762f1e766a5b2307545f7d28f33acbe4b2b 100644
|
| --- a/chromeos/cryptohome/async_method_caller.cc
|
| +++ b/chromeos/cryptohome/async_method_caller.cc
|
| @@ -9,6 +9,7 @@
|
| #include "base/location.h"
|
| #include "base/message_loop/message_loop_proxy.h"
|
| #include "chromeos/dbus/dbus_thread_manager.h"
|
| +#include "components/user_manager/user_id.h"
|
|
|
| using chromeos::DBusThreadManager;
|
|
|
| @@ -34,47 +35,47 @@ class AsyncMethodCallerImpl : public AsyncMethodCaller {
|
| ResetAsyncCallStatusHandlers();
|
| }
|
|
|
| - void AsyncCheckKey(const std::string& user_email,
|
| + void AsyncCheckKey(const user_manager::UserID& user_id,
|
| const std::string& passhash,
|
| Callback callback) override {
|
| DBusThreadManager::Get()->GetCryptohomeClient()->
|
| - AsyncCheckKey(user_email, passhash, base::Bind(
|
| + AsyncCheckKey(user_id, passhash, base::Bind(
|
| &AsyncMethodCallerImpl::RegisterAsyncCallback,
|
| weak_ptr_factory_.GetWeakPtr(),
|
| callback,
|
| "Couldn't initiate async check of user's key."));
|
| }
|
|
|
| - void AsyncMigrateKey(const std::string& user_email,
|
| + void AsyncMigrateKey(const user_manager::UserID& user_id,
|
| const std::string& old_hash,
|
| const std::string& new_hash,
|
| Callback callback) override {
|
| DBusThreadManager::Get()->GetCryptohomeClient()->
|
| - AsyncMigrateKey(user_email, old_hash, new_hash, base::Bind(
|
| + AsyncMigrateKey(user_id, old_hash, new_hash, base::Bind(
|
| &AsyncMethodCallerImpl::RegisterAsyncCallback,
|
| weak_ptr_factory_.GetWeakPtr(),
|
| callback,
|
| "Couldn't initiate aync migration of user's key"));
|
| }
|
|
|
| - void AsyncMount(const std::string& user_email,
|
| + void AsyncMount(const user_manager::UserID& user_id,
|
| const std::string& passhash,
|
| int flags,
|
| Callback callback) override {
|
| DBusThreadManager::Get()->GetCryptohomeClient()->
|
| - AsyncMount(user_email, passhash, flags, base::Bind(
|
| + AsyncMount(user_id, passhash, flags, base::Bind(
|
| &AsyncMethodCallerImpl::RegisterAsyncCallback,
|
| weak_ptr_factory_.GetWeakPtr(),
|
| callback,
|
| "Couldn't initiate async mount of cryptohome."));
|
| }
|
|
|
| - void AsyncAddKey(const std::string& user_email,
|
| + void AsyncAddKey(const user_manager::UserID& user_id,
|
| const std::string& passhash,
|
| const std::string& new_passhash,
|
| Callback callback) override {
|
| DBusThreadManager::Get()->GetCryptohomeClient()->
|
| - AsyncAddKey(user_email, passhash, new_passhash, base::Bind(
|
| + AsyncAddKey(user_id, passhash, new_passhash, base::Bind(
|
| &AsyncMethodCallerImpl::RegisterAsyncCallback,
|
| weak_ptr_factory_.GetWeakPtr(),
|
| callback,
|
| @@ -101,9 +102,9 @@ class AsyncMethodCallerImpl : public AsyncMethodCaller {
|
| "Couldn't initiate async mount public of cryptohome."));
|
| }
|
|
|
| - void AsyncRemove(const std::string& user_email, Callback callback) override {
|
| + void AsyncRemove(const user_manager::UserID& user_id, Callback callback) override {
|
| DBusThreadManager::Get()->GetCryptohomeClient()->
|
| - AsyncRemove(user_email, base::Bind(
|
| + AsyncRemove(user_id, base::Bind(
|
| &AsyncMethodCallerImpl::RegisterAsyncCallback,
|
| weak_ptr_factory_.GetWeakPtr(),
|
| callback,
|
| @@ -135,7 +136,7 @@ class AsyncMethodCallerImpl : public AsyncMethodCaller {
|
| void AsyncTpmAttestationCreateCertRequest(
|
| chromeos::attestation::PrivacyCAType pca_type,
|
| chromeos::attestation::AttestationCertificateProfile certificate_profile,
|
| - const std::string& user_id,
|
| + const user_manager::UserID& user_id,
|
| const std::string& request_origin,
|
| const DataCallback& callback) override {
|
| DBusThreadManager::Get()->GetCryptohomeClient()->
|
| @@ -153,7 +154,7 @@ class AsyncMethodCallerImpl : public AsyncMethodCaller {
|
| void AsyncTpmAttestationFinishCertRequest(
|
| const std::string& pca_response,
|
| chromeos::attestation::AttestationKeyType key_type,
|
| - const std::string& user_id,
|
| + const user_manager::UserID& user_id,
|
| const std::string& key_name,
|
| const DataCallback& callback) override {
|
| DBusThreadManager::Get()->GetCryptohomeClient()->
|
| @@ -171,7 +172,7 @@ class AsyncMethodCallerImpl : public AsyncMethodCaller {
|
|
|
| void TpmAttestationRegisterKey(
|
| chromeos::attestation::AttestationKeyType key_type,
|
| - const std::string& user_id,
|
| + const user_manager::UserID& user_id,
|
| const std::string& key_name,
|
| const Callback& callback) override {
|
| DBusThreadManager::Get()->GetCryptohomeClient()->
|
| @@ -188,7 +189,7 @@ class AsyncMethodCallerImpl : public AsyncMethodCaller {
|
|
|
| void TpmAttestationSignEnterpriseChallenge(
|
| chromeos::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,
|
| @@ -213,7 +214,7 @@ class AsyncMethodCallerImpl : public AsyncMethodCaller {
|
|
|
| void TpmAttestationSignSimpleChallenge(
|
| chromeos::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 DataCallback& callback) override {
|
| @@ -230,10 +231,10 @@ class AsyncMethodCallerImpl : public AsyncMethodCaller {
|
| "Couldn't initiate async attestation simple challenge."));
|
| }
|
|
|
| - void AsyncGetSanitizedUsername(const std::string& user,
|
| + void AsyncGetSanitizedUsername(const user_manager::UserID& user_id,
|
| const DataCallback& callback) override {
|
| DBusThreadManager::Get()->GetCryptohomeClient()->
|
| - GetSanitizedUsername(user,
|
| + GetSanitizedUsername(user_id,
|
| base::Bind(
|
| &AsyncMethodCallerImpl::GetSanitizedUsernameCallback,
|
| weak_ptr_factory_.GetWeakPtr(),
|
|
|