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

Unified Diff: chromeos/dbus/cryptohome_client.cc

Issue 2808423002: cros: Show dircryto migration banner (Closed)
Patch Set: add a test, fix nits Created 3 years, 8 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 23e6f312463af0ffee64a14c50c3df6408d84d79..dadb5c6e6f68e27862f6ae1f721d3a94a6c68d42 100644
--- a/chromeos/dbus/cryptohome_client.cc
+++ b/chromeos/dbus/cryptohome_client.cc
@@ -941,6 +941,24 @@ class CryptohomeClientImpl : public CryptohomeClient {
weak_ptr_factory_.GetWeakPtr(), callback));
}
+ void NeedsDircryptoMigration(
+ const cryptohome::Identification& cryptohome_id,
+ const BoolDBusMethodCallback& callback) override {
+ dbus::MethodCall method_call(
+ cryptohome::kCryptohomeInterface,
+ cryptohome::kCryptohomeNeedsDircryptoMigration);
+
+ cryptohome::AccountIdentifier id_proto;
+ FillIdentificationProtobuf(cryptohome_id, &id_proto);
+
+ dbus::MessageWriter writer(&method_call);
+ writer.AppendProtoAsArrayOfBytes(id_proto);
+
+ proxy_->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
+ base::Bind(&CryptohomeClientImpl::OnBoolMethod,
+ weak_ptr_factory_.GetWeakPtr(), callback));
+ }
+
protected:
void Init(dbus::Bus* bus) override {
proxy_ = bus->GetObjectProxy(
« 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