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

Unified Diff: chromeos/dbus/fake_cryptohome_client.h

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.cc ('k') | chromeos/dbus/fake_cryptohome_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/fake_cryptohome_client.h
diff --git a/chromeos/dbus/fake_cryptohome_client.h b/chromeos/dbus/fake_cryptohome_client.h
index 0cf31deab36cf5e007e420e398c8053ec81a5f3f..e1b5d94f172e48496d94f0f7c8c034023fbfb69f 100644
--- a/chromeos/dbus/fake_cryptohome_client.h
+++ b/chromeos/dbus/fake_cryptohome_client.h
@@ -207,6 +207,8 @@ class CHROMEOS_EXPORT FakeCryptohomeClient : public CryptohomeClient {
void SetFirmwareManagementParametersInTpm(
const cryptohome::SetFirmwareManagementParametersRequest& request,
const ProtobufMethodCallback& callback) override;
+ void NeedsDircryptoMigration(const cryptohome::Identification& cryptohome_id,
+ const BoolDBusMethodCallback& callback) override;
// Changes the behavior of WaitForServiceToBeAvailable(). This method runs
// pending callbacks if is_available is true.
@@ -228,6 +230,11 @@ class CHROMEOS_EXPORT FakeCryptohomeClient : public CryptohomeClient {
// format used by SystemSaltGetter::ConvertRawSaltToHexString()).
static std::vector<uint8_t> GetStubSystemSalt();
+ // Sets the needs dircrypto migration value.
+ void set_needs_dircrypto_migration(bool needs_migration) {
+ needs_dircrypto_migration_ = needs_migration;
+ }
+
private:
void ReturnProtobufMethodCallback(
const cryptohome::BaseReply& reply,
@@ -270,6 +277,8 @@ class CHROMEOS_EXPORT FakeCryptohomeClient : public CryptohomeClient {
base::RepeatingTimer dircrypto_migration_progress_timer_;
uint64_t dircrypto_migration_progress_;
+ bool needs_dircrypto_migration_ = false;
+
base::WeakPtrFactory<FakeCryptohomeClient> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(FakeCryptohomeClient);
« no previous file with comments | « chromeos/dbus/cryptohome_client.cc ('k') | chromeos/dbus/fake_cryptohome_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698