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

Unified Diff: chromeos/dbus/fake_cryptohome_client.h

Issue 2784273003: Implement a basic UI flow for cryptohome encryption migration. (Closed)
Patch Set: Address review comments. 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/fake_cryptohome_client.h
diff --git a/chromeos/dbus/fake_cryptohome_client.h b/chromeos/dbus/fake_cryptohome_client.h
index 1a7f03dba7a3587bc3c793f1d9a5f2e0efd9795f..741521eafc0e01611120821986926983fe68c1ee 100644
--- a/chromeos/dbus/fake_cryptohome_client.h
+++ b/chromeos/dbus/fake_cryptohome_client.h
@@ -13,6 +13,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
+#include "base/timer/timer.h"
#include "chromeos/dbus/cryptohome_client.h"
namespace chromeos {
@@ -240,6 +241,10 @@ class CHROMEOS_EXPORT FakeCryptohomeClient : public CryptohomeClient {
void ReturnAsyncMethodDataInternal(const AsyncMethodCallback& callback,
const std::string& data);
+ // This method is used to implement MigrateToDircrypto with simulated progress
+ // updates.
+ void OnDircryptoMigrationProgressUpdated();
+
bool service_is_available_;
int async_call_id_;
AsyncCallStatusHandler async_call_status_handler_;
@@ -254,6 +259,11 @@ class CHROMEOS_EXPORT FakeCryptohomeClient : public CryptohomeClient {
// associated data blob. Used to implement InstallAttributesSet and -Get.
std::map<std::string, std::vector<uint8_t>> install_attrs_;
bool locked_;
+
+ DircryptoMigrationProgessHandler dircrypto_migration_progress_handler_;
+ base::RepeatingTimer dircrypto_migration_progress_timer_;
+ uint64_t dircrypto_migration_progress_;
+
base::WeakPtrFactory<FakeCryptohomeClient> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(FakeCryptohomeClient);
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.cc ('k') | chromeos/dbus/fake_cryptohome_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698