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

Unified Diff: chromeos/dbus/cryptohome_client.h

Issue 2748743004: cryptohome: Add dbus method and signal name for encryption migration. (Closed)
Patch Set: 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
Index: chromeos/dbus/cryptohome_client.h
diff --git a/chromeos/dbus/cryptohome_client.h b/chromeos/dbus/cryptohome_client.h
index 8fc61f94b0e4f64241a565479d13f9aad0ed5e41..af86fc1248de9a146bb1a5173f6db0f43769ced6 100644
--- a/chromeos/dbus/cryptohome_client.h
+++ b/chromeos/dbus/cryptohome_client.h
@@ -91,6 +91,10 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
bool result,
const cryptohome::BaseReply& reply)> ProtobufMethodCallback;
+ // A callback to handle DircryptoMigrationProgress signals.
+ typedef base::Callback<void(uint64_t current, uint64_t total)>
+ DircryptoMigrationProgessHandler;
+
~CryptohomeClient() override;
// Factory function, creates a new instance and returns ownership.
@@ -116,6 +120,11 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
// partition is running out of disk space.
virtual void SetLowDiskSpaceHandler(const LowDiskSpaceHandler& handler) = 0;
+ // A callback to handle DircryptoMigrationProgress signals. |handler| is
+ // called periodicaly during a migration is performed by cryptohomed.
Daniel Erat 2017/03/14 15:37:36 nit: "called periodically while a migration is bei
kinaba 2017/03/15 08:17:30 My intent is that the callback from MigrateToDircr
+ virtual void SetDircryptoMigrationProgressHandler(
+ const DircryptoMigrationProgessHandler& handler) = 0;
+
// Runs the callback as soon as the service becomes available.
virtual void WaitForServiceToBeAvailable(
const WaitForServiceToBeAvailableCallback& callback) = 0;
@@ -555,6 +564,15 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
const cryptohome::FlushAndSignBootAttributesRequest& request,
const ProtobufMethodCallback& callback) = 0;
+ // Asynchronously calls MigrateToDicrypto method. |callback| is called after
+ // method call, and with reply protobuf.
Daniel Erat 2017/03/14 15:37:36 does the callback get invoked immediately, or only
kinaba 2017/03/15 08:17:30 Done.
+ // MigrateToDicrypto attempts to migrate the home dir using given
Daniel Erat 2017/03/14 15:37:37 nit: MigrateToDirCrypto
kinaba 2017/03/15 08:17:30 Done.
+ // authorization, to the new "dicrypto" encryption.
Daniel Erat 2017/03/14 15:37:36 nit: "dircrypto", also remove comma on this line
kinaba 2017/03/15 08:17:30 Done.
+ virtual void MigrateToDircrypto(
+ const cryptohome::Identification& cryptohome_id,
+ const cryptohome::AuthorizationRequest& auth,
+ const ProtobufMethodCallback& callback) = 0;
+
protected:
// Create() should be used instead.
CryptohomeClient();

Powered by Google App Engine
This is Rietveld 408576698