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

Unified Diff: chrome/browser/chromeos/login/screens/user_selection_screen.cc

Issue 2849333002: cros: Skip need-dircrypto-migration check if not needed (Closed)
Patch Set: update test 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 | « no previous file | chrome/browser/chromeos/login/screens/user_selection_screen_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/screens/user_selection_screen.cc
diff --git a/chrome/browser/chromeos/login/screens/user_selection_screen.cc b/chrome/browser/chromeos/login/screens/user_selection_screen.cc
index 6f1f616239d6d554baa52bfab21847a52dd1cbef..b92c4402f2f8a62512201d50dadab7b085913f9c 100644
--- a/chrome/browser/chromeos/login/screens/user_selection_screen.cc
+++ b/chrome/browser/chromeos/login/screens/user_selection_screen.cc
@@ -10,6 +10,7 @@
#include "base/bind.h"
#include "base/callback.h"
+#include "base/command_line.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
@@ -30,10 +31,12 @@
#include "chrome/browser/ui/webui/chromeos/login/l10n_util.h"
#include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
#include "chrome/grit/generated_resources.h"
+#include "chromeos/chromeos_switches.h"
#include "chromeos/cryptohome/cryptohome_parameters.h"
#include "chromeos/dbus/cryptohome_client.h"
#include "chromeos/dbus/dbus_method_call_status.h"
#include "chromeos/dbus/dbus_thread_manager.h"
+#include "components/arc/arc_util.h"
#include "components/prefs/pref_service.h"
#include "components/proximity_auth/screenlock_bridge.h"
#include "components/signin/core/account_id/account_id.h"
@@ -139,6 +142,13 @@ bool AllowFingerprintForUser(user_manager::User* user) {
return quick_unlock_storage->IsFingerprintAuthenticationAvailable();
}
+// Returns true if dircrypto migration check should be performed.
+bool ShouldCheckNeedDircryptoMigration() {
+ return !base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableEncryptionMigration) &&
+ arc::IsArcAvailable();
+}
+
} // namespace
// Helper class to call cryptohome to check whether a user needs dircrypto
@@ -536,8 +546,9 @@ void UserSelectionScreen::CheckUserStatus(const AccountId& account_id) {
weak_factory_.GetWeakPtr()));
}
- // Run dircrypto migration check only on the login screen.
- if (display_type_ == OobeUI::kLoginDisplay) {
+ // Run dircrypto migration check only on the login screen when necessary.
+ if (display_type_ == OobeUI::kLoginDisplay &&
+ ShouldCheckNeedDircryptoMigration()) {
if (!dircrypto_migration_checker_) {
dircrypto_migration_checker_ =
base::MakeUnique<DircryptoMigrationChecker>(this);
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screens/user_selection_screen_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698