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

Unified Diff: chromeos/cryptohome/homedir_methods.cc

Issue 2748743004: cryptohome: Add dbus method and signal name for encryption migration. (Closed)
Patch Set: Roll DEPS Created 3 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/cryptohome/homedir_methods.h ('k') | chromeos/cryptohome/mock_homedir_methods.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/cryptohome/homedir_methods.cc
diff --git a/chromeos/cryptohome/homedir_methods.cc b/chromeos/cryptohome/homedir_methods.cc
index 617c17afd9cf2c864daa36fe585939009aa64e42..1b540eb06050b32d0967f38e85be7aa775f5bca9 100644
--- a/chromeos/cryptohome/homedir_methods.cc
+++ b/chromeos/cryptohome/homedir_methods.cc
@@ -298,6 +298,18 @@ class HomedirMethodsImpl : public HomedirMethods {
weak_ptr_factory_.GetWeakPtr(), callback));
}
+ void MigrateToDircrypto(const Identification& id,
+ const Authorization& auth,
+ const DBusResultCallback& callback) override {
+ cryptohome::AuthorizationRequest auth_proto;
+ FillAuthorizationProtobuf(auth, &auth_proto);
+
+ DBusThreadManager::Get()->GetCryptohomeClient()->MigrateToDircrypto(
+ id, auth_proto,
+ base::Bind(&HomedirMethodsImpl::OnDBusResultCallback,
+ weak_ptr_factory_.GetWeakPtr(), callback));
+ }
+
private:
void OnGetKeyDataExCallback(const GetKeyDataCallback& callback,
chromeos::DBusMethodCallStatus call_status,
@@ -459,6 +471,11 @@ class HomedirMethodsImpl : public HomedirMethods {
callback.Run(true, MOUNT_ERROR_NONE);
}
+ void OnDBusResultCallback(const DBusResultCallback& callback,
+ chromeos::DBusMethodCallStatus call_status) {
+ callback.Run(call_status == chromeos::DBUS_METHOD_CALL_SUCCESS);
+ }
+
base::WeakPtrFactory<HomedirMethodsImpl> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(HomedirMethodsImpl);
« no previous file with comments | « chromeos/cryptohome/homedir_methods.h ('k') | chromeos/cryptohome/mock_homedir_methods.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698