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

Unified Diff: chromeos/dbus/cryptohome_client.h

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/mock_homedir_methods.h ('k') | chromeos/dbus/cryptohome_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/cryptohome_client.h
diff --git a/chromeos/dbus/cryptohome_client.h b/chromeos/dbus/cryptohome_client.h
index 8fc61f94b0e4f64241a565479d13f9aad0ed5e41..8a4bc62c9c76710cbe10e1951084bc5059bfb7d4 100644
--- a/chromeos/dbus/cryptohome_client.h
+++ b/chromeos/dbus/cryptohome_client.h
@@ -16,6 +16,7 @@
#include "chromeos/chromeos_export.h"
#include "chromeos/dbus/dbus_client.h"
#include "chromeos/dbus/dbus_method_call_status.h"
+#include "third_party/cros_system_api/dbus/service_constants.h"
namespace cryptohome {
@@ -91,6 +92,12 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
bool result,
const cryptohome::BaseReply& reply)> ProtobufMethodCallback;
+ // A callback to handle DircryptoMigrationProgress signals.
+ typedef base::Callback<void(cryptohome::DircryptoMigrationStatus status,
+ uint64_t current,
+ uint64_t total)>
+ DircryptoMigrationProgessHandler;
+
~CryptohomeClient() override;
// Factory function, creates a new instance and returns ownership.
@@ -116,6 +123,12 @@ 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, as well
+ // as to notify the completion of migration.
+ 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 +568,17 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
const cryptohome::FlushAndSignBootAttributesRequest& request,
const ProtobufMethodCallback& callback) = 0;
+ // Asynchronously calls MigrateToDircrypto method. It tells cryptohomed to
+ // start migration, and is immediately called back by |callback|. The actual
+ // result response is done via DircryptoMigrationProgress callback with its
+ // status flag indicating the completion.
+ // MigrateToDircrypto attempts to migrate the home dir using given
+ // authorization to the new "dircrypto" encryption.
+ virtual void MigrateToDircrypto(
+ const cryptohome::Identification& cryptohome_id,
+ const cryptohome::AuthorizationRequest& auth,
+ const VoidDBusMethodCallback& callback) = 0;
+
protected:
// Create() should be used instead.
CryptohomeClient();
« no previous file with comments | « chromeos/cryptohome/mock_homedir_methods.h ('k') | chromeos/dbus/cryptohome_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698