Chromium Code Reviews| Index: chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.cc |
| diff --git a/chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.cc b/chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.cc |
| index 3beae8927a1fa80f5b903877df4f881b2266fdd4..a2284e1f55cd1ff790a5bf565cb5c4e229fc1969 100644 |
| --- a/chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.cc |
| +++ b/chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.cc |
| @@ -9,6 +9,7 @@ |
| #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| #include "chrome/common/chrome_features.h" |
| #include "chrome/common/pref_names.h" |
| +#include "components/pref_registry/pref_registry_syncable.h" |
| #include "components/prefs/pref_registry_simple.h" |
| #include "components/prefs/pref_service.h" |
| #include "components/user_manager/user_manager.h" |
| @@ -30,6 +31,9 @@ void RegisterQuickUnlockProfilePrefs(PrefRegistrySimple* registry) { |
| registry->RegisterIntegerPref( |
| prefs::kQuickUnlockTimeout, |
| static_cast<int>(QuickUnlockPasswordConfirmationFrequency::DAY)); |
| + registry->RegisterBooleanPref( |
| + prefs::kEnableQuickUnlockFingerprint, false, |
|
jdufault
2016/12/01 17:11:19
I believe the pref is syncable by default, so this
sammiequon
2016/12/01 20:52:28
Done.
|
| + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| } |
| bool IsPinUnlockEnabled(PrefService* pref_service) { |
| @@ -58,6 +62,14 @@ bool IsPinUnlockEnabled(PrefService* pref_service) { |
| return base::FeatureList::IsEnabled(features::kQuickUnlockPin); |
| } |
| +bool IsFingerprintUnlockEnabled() { |
| + // Enable fingerprint unlock only if the switch is present. For now, |
| + // fingerprint unlock will not be seen if quick unlock switch is not present, |
| + // so check that too. |
| + return base::FeatureList::IsEnabled(features::kQuickUnlockPin) && |
|
jdufault
2016/12/01 17:11:19
Why are these tied together like this?
sammiequon
2016/12/01 20:52:29
The fingerprint settings are under the lock screen
jdufault
2016/12/02 23:02:11
You should update the comment with that info.
sammiequon
2016/12/03 21:40:51
Done.
|
| + base::FeatureList::IsEnabled(features::kQuickUnlockFingerprint); |
| +} |
| + |
| void EnableQuickUnlockForTesting() { |
| enable_for_testing_ = true; |
| } |