| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h" | 5 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/location.h" | 14 #include "base/location.h" |
| 15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/memory/ptr_util.h" | 16 #include "base/memory/ptr_util.h" |
| 17 #include "base/values.h" | 17 #include "base/values.h" |
| 18 #include "chrome/browser/browser_process.h" | 18 #include "chrome/browser/browser_process.h" |
| 19 #include "chrome/browser/browser_process_platform_part.h" | 19 #include "chrome/browser/browser_process_platform_part.h" |
| 20 #include "chrome/browser/chromeos/login/lock/screen_locker.h" | 20 #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
| 21 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_factory.h" | 21 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_factory.h" |
| 22 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.h" | 22 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.h" |
| 23 #include "chrome/browser/chromeos/login/reauth_stats.h" | 23 #include "chrome/browser/chromeos/login/reauth_stats.h" |
| 24 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 24 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 25 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
| 25 #include "chrome/browser/chromeos/login/ui/views/user_board_view.h" | 26 #include "chrome/browser/chromeos/login/ui/views/user_board_view.h" |
| 26 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" | 27 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" |
| 27 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h" | 28 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h" |
| 28 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 29 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 29 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 30 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 30 #include "chrome/browser/signin/easy_unlock_service.h" | 31 #include "chrome/browser/signin/easy_unlock_service.h" |
| 31 #include "chrome/browser/ui/webui/chromeos/login/l10n_util.h" | 32 #include "chrome/browser/ui/webui/chromeos/login/l10n_util.h" |
| 32 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 33 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
| 33 #include "chrome/grit/generated_resources.h" | 34 #include "chrome/grit/generated_resources.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 quick_unlock::QuickUnlockStorage* quick_unlock_storage = | 138 quick_unlock::QuickUnlockStorage* quick_unlock_storage = |
| 138 quick_unlock::QuickUnlockFactory::GetForUser(user); | 139 quick_unlock::QuickUnlockFactory::GetForUser(user); |
| 139 if (!quick_unlock_storage) | 140 if (!quick_unlock_storage) |
| 140 return false; | 141 return false; |
| 141 | 142 |
| 142 return quick_unlock_storage->IsFingerprintAuthenticationAvailable(); | 143 return quick_unlock_storage->IsFingerprintAuthenticationAvailable(); |
| 143 } | 144 } |
| 144 | 145 |
| 145 // Returns true if dircrypto migration check should be performed. | 146 // Returns true if dircrypto migration check should be performed. |
| 146 bool ShouldCheckNeedDircryptoMigration() { | 147 bool ShouldCheckNeedDircryptoMigration() { |
| 148 chromeos::StartupUtils::SetExt4MigrationForArcAllowed(); |
| 147 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | 149 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 148 switches::kDisableEncryptionMigration) && | 150 switches::kDisableEncryptionMigration) && |
| 149 arc::IsArcAvailable(); | 151 arc::IsArcAvailable(); |
| 150 } | 152 } |
| 151 | 153 |
| 152 // Returns true if the user can run ARC based on the user type. | 154 // Returns true if the user can run ARC based on the user type. |
| 153 bool IsUserAllowedForARC(const AccountId& account_id) { | 155 bool IsUserAllowedForARC(const AccountId& account_id) { |
| 154 if (!user_manager::UserManager::IsInitialized()) | 156 if (!user_manager::UserManager::IsInitialized()) |
| 155 return false; | 157 return false; |
| 156 | 158 |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 // The user profile should exist if and only if this is the lock screen. | 714 // The user profile should exist if and only if this is the lock screen. |
| 713 DCHECK_EQ(!!profile, GetScreenType() == LOCK_SCREEN); | 715 DCHECK_EQ(!!profile, GetScreenType() == LOCK_SCREEN); |
| 714 | 716 |
| 715 if (!profile) | 717 if (!profile) |
| 716 profile = profile_helper->GetSigninProfile(); | 718 profile = profile_helper->GetSigninProfile(); |
| 717 | 719 |
| 718 return EasyUnlockService::Get(profile); | 720 return EasyUnlockService::Get(profile); |
| 719 } | 721 } |
| 720 | 722 |
| 721 } // namespace chromeos | 723 } // namespace chromeos |
| OLD | NEW |