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

Unified Diff: chromeos/dbus/cryptohome_client.cc

Issue 1738023002: ChromeOS: Add RenameCryptohome and migration code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@462823--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part11--migrate-cryptohomes
Patch Set: Update after review. Created 4 years, 9 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
« no previous file with comments | « chromeos/dbus/cryptohome_client.h ('k') | chromeos/dbus/fake_cryptohome_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/cryptohome_client.cc
diff --git a/chromeos/dbus/cryptohome_client.cc b/chromeos/dbus/cryptohome_client.cc
index 0df97a3605a88d9c74e1662f4e56bcced06e5da5..bdf5125314d2797b47a59b8c4d9413991817ebc1 100644
--- a/chromeos/dbus/cryptohome_client.cc
+++ b/chromeos/dbus/cryptohome_client.cc
@@ -128,6 +128,26 @@ class CryptohomeClientImpl : public CryptohomeClient {
}
// CryptohomeClient override.
+ void RenameCryptohome(const cryptohome::Identification& cryptohome_id_from,
+ const cryptohome::Identification& cryptohome_id_to,
+ const ProtobufMethodCallback& callback) override {
+ const char* method_name = cryptohome::kCryptohomeRenameCryptohome;
+ dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, method_name);
+
+ cryptohome::AccountIdentifier id_from_proto;
+ cryptohome::AccountIdentifier id_to_proto;
+ FillIdentificationProtobuf(cryptohome_id_from, &id_from_proto);
+ FillIdentificationProtobuf(cryptohome_id_to, &id_to_proto);
+
+ dbus::MessageWriter writer(&method_call);
+ writer.AppendProtoAsArrayOfBytes(id_from_proto);
+ writer.AppendProtoAsArrayOfBytes(id_to_proto);
+ proxy_->CallMethod(&method_call, kTpmDBusTimeoutMs,
+ base::Bind(&CryptohomeClientImpl::OnBaseReplyMethod,
+ weak_ptr_factory_.GetWeakPtr(), callback));
+ }
+
+ // CryptohomeClient override.
void GetSystemSalt(const GetSystemSaltCallback& callback) override {
dbus::MethodCall method_call(cryptohome::kCryptohomeInterface,
cryptohome::kCryptohomeGetSystemSalt);
« no previous file with comments | « chromeos/dbus/cryptohome_client.h ('k') | chromeos/dbus/fake_cryptohome_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698