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

Unified Diff: chromeos/dbus/fake_cryptohome_client.cc

Issue 2779933002: Add a screen to migrate filesystem encryption from eCryptfs to ext4 crypto. (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
« no previous file with comments | « chromeos/chromeos_switches.cc ('k') | chromeos/login/auth/auth_status_consumer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/fake_cryptohome_client.cc
diff --git a/chromeos/dbus/fake_cryptohome_client.cc b/chromeos/dbus/fake_cryptohome_client.cc
index f7f117391d40a89fe5b6772eb16ba66a1f5b60e8..5954af0593ada4496fe4be01a9044f7bc9ca365b 100644
--- a/chromeos/dbus/fake_cryptohome_client.cc
+++ b/chromeos/dbus/fake_cryptohome_client.cc
@@ -8,6 +8,7 @@
#include <stdint.h>
#include "base/bind.h"
+#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/location.h"
#include "base/path_service.h"
@@ -16,6 +17,7 @@
#include "base/threading/thread_task_runner_handle.h"
#include "chromeos/attestation/attestation.pb.h"
#include "chromeos/chromeos_paths.h"
+#include "chromeos/chromeos_switches.h"
#include "chromeos/dbus/cryptohome/key.pb.h"
#include "chromeos/dbus/cryptohome/rpc.pb.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
@@ -523,6 +525,10 @@ void FakeCryptohomeClient::MountEx(
cryptohome::MountReply* mount =
reply.MutableExtension(cryptohome::MountReply::reply);
mount->set_sanitized_username(GetStubSanitizedUsername(cryptohome_id));
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kTestEncryptionMigrationUI)) {
+ reply.set_error(cryptohome::CRYPTOHOME_ERROR_MOUNT_OLD_ENCRYPTION);
+ }
ReturnProtobufMethodCallback(reply, callback);
}
« no previous file with comments | « chromeos/chromeos_switches.cc ('k') | chromeos/login/auth/auth_status_consumer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698