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

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

Issue 2538303002: md-settings: Added settings for fingerprint unlock. (Closed)
Patch Set: Fixed patch set 6 errors. 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 3beae8927a1fa80f5b903877df4f881b2266fdd4..3259224bd00aa447ed0e1dffe4e83cb8b7ddb3c7 100644
--- a/chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.cc
+++ b/chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.cc
@@ -30,6 +30,7 @@ void RegisterQuickUnlockProfilePrefs(PrefRegistrySimple* registry) {
registry->RegisterIntegerPref(
prefs::kQuickUnlockTimeout,
static_cast<int>(QuickUnlockPasswordConfirmationFrequency::DAY));
+ registry->RegisterBooleanPref(prefs::kEnableQuickUnlockFingerprint, false);
}
bool IsPinUnlockEnabled(PrefService* pref_service) {
@@ -58,6 +59,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) &&
+ base::FeatureList::IsEnabled(features::kQuickUnlockFingerprint);
+}
+
void EnableQuickUnlockForTesting() {
enable_for_testing_ = true;
}

Powered by Google App Engine
This is Rietveld 408576698