| Index: chromeos/cryptohome/homedir_methods.cc
|
| diff --git a/chromeos/cryptohome/homedir_methods.cc b/chromeos/cryptohome/homedir_methods.cc
|
| index 8413c72f239dbdc35a33339c00e342cbd733b279..3e3defb486da8be8f36c6b859b731b55a9c42523 100644
|
| --- a/chromeos/cryptohome/homedir_methods.cc
|
| +++ b/chromeos/cryptohome/homedir_methods.cc
|
| @@ -98,7 +98,7 @@ void FillKeyProtobuf(const KeyDefinition& key_def, Key* key) {
|
| // Fill identification protobuffer.
|
| void FillIdentificationProtobuf(const Identification& id,
|
| cryptohome::AccountIdentifier* id_proto) {
|
| - id_proto->set_email(id.user_id);
|
| + id_proto->set_account_id(id.id());
|
| }
|
|
|
| // Fill authorization protobuffer.
|
| @@ -306,12 +306,24 @@ class HomedirMethodsImpl : public HomedirMethods {
|
| pb_update_key.set_authorization_signature(signature);
|
|
|
| DBusThreadManager::Get()->GetCryptohomeClient()->UpdateKeyEx(
|
| - id_proto,
|
| - auth_proto,
|
| - pb_update_key,
|
| + id_proto, auth_proto, pb_update_key,
|
| base::Bind(&HomedirMethodsImpl::OnBaseReplyCallback,
|
| - weak_ptr_factory_.GetWeakPtr(),
|
| - callback));
|
| + weak_ptr_factory_.GetWeakPtr(), callback));
|
| + }
|
| +
|
| + void RenameCryptohome(const Identification& id_from,
|
| + const Identification& id_to,
|
| + const Callback& callback) override {
|
| + cryptohome::AccountIdentifier id_from_proto;
|
| + cryptohome::AccountIdentifier id_to_proto;
|
| +
|
| + FillIdentificationProtobuf(id_from, &id_from_proto);
|
| + FillIdentificationProtobuf(id_to, &id_to_proto);
|
| +
|
| + DBusThreadManager::Get()->GetCryptohomeClient()->RenameCryptohome(
|
| + id_from_proto, id_to_proto,
|
| + base::Bind(&HomedirMethodsImpl::OnBaseReplyCallback,
|
| + weak_ptr_factory_.GetWeakPtr(), callback));
|
| }
|
|
|
| private:
|
|
|