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

Unified Diff: chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.cc

Issue 2538303002: md-settings: Added settings for fingerprint unlock. (Closed)
Patch Set: Nit. Created 4 years 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
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 653539f33e80be9c0637cd9b0fab027a0bfffa81..75d915d8c77445a976ef3ab15bc8b577ca7d9975 100644
--- a/chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.cc
+++ b/chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.cc
@@ -36,6 +36,8 @@ void RegisterQuickUnlockProfilePrefs(PrefRegistrySimple* registry) {
// 0 indicates no maximum length for the pin.
registry->RegisterIntegerPref(prefs::kPinUnlockMaximumLength, 0);
registry->RegisterBooleanPref(prefs::kPinUnlockWeakPinsAllowed, true);
+
+ registry->RegisterBooleanPref(prefs::kEnableQuickUnlockFingerprint, false);
}
bool IsPinUnlockEnabled(PrefService* pref_service) {
@@ -64,6 +66,14 @@ bool IsPinUnlockEnabled(PrefService* pref_service) {
return base::FeatureList::IsEnabled(features::kQuickUnlockPin);
}
+bool IsFingerprintUnlockEnabled() {
+ // Enable fingerprint unlock only if the switch is present. The fingerprint
+ // settings are under the lock screen so we cannot set it up without
+ // kQuickUnlockPin enabled, so make sure that feature is turned on as well.
+ return base::FeatureList::IsEnabled(features::kQuickUnlockPin) &&
Dan Beam 2016/12/13 19:53:23 can we rename the Pin version to just kQuickUnlock
sammiequon 2016/12/13 23:33:33 Should I add a TODO and bug or do you prefer to do
jdufault 2016/12/14 17:58:57 That seems confusing; in the context of kQuickUnlo
Dan Beam 2016/12/14 22:25:17 it's not too long, it's confusing that the PIN ver
jdufault 2016/12/14 23:32:56 Yes, I agree. I think renaming only the flag/pref
sammiequon 2017/01/10 22:33:27 I removed the dependence on kQuickUnlockPin.
+ base::FeatureList::IsEnabled(features::kQuickUnlockFingerprint);
+}
+
void EnableQuickUnlockForTesting() {
enable_for_testing_ = true;
}

Powered by Google App Engine
This is Rietveld 408576698