| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_QUICK_UNLOCK_QUICK_UNLOCK_UTILS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_QUICK_UNLOCK_QUICK_UNLOCK_UTILS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_QUICK_UNLOCK_QUICK_UNLOCK_UTILS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_QUICK_UNLOCK_QUICK_UNLOCK_UTILS_H_ |
| 7 | 7 |
| 8 namespace base { | 8 namespace base { |
| 9 class TimeDelta; | 9 class TimeDelta; |
| 10 } | 10 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 base::TimeDelta PasswordConfirmationFrequencyToTimeDelta( | 29 base::TimeDelta PasswordConfirmationFrequencyToTimeDelta( |
| 30 PasswordConfirmationFrequency frequency); | 30 PasswordConfirmationFrequency frequency); |
| 31 | 31 |
| 32 // Register quick unlock prefs. | 32 // Register quick unlock prefs. |
| 33 void RegisterProfilePrefs(PrefRegistrySimple* registry); | 33 void RegisterProfilePrefs(PrefRegistrySimple* registry); |
| 34 | 34 |
| 35 // Returns true if PIN unlock is allowed by policy and the quick unlock feature | 35 // Returns true if PIN unlock is allowed by policy and the quick unlock feature |
| 36 // flag is present. | 36 // flag is present. |
| 37 bool IsPinEnabled(PrefService* pref_service); | 37 bool IsPinEnabled(PrefService* pref_service); |
| 38 | 38 |
| 39 // What subsystem should provide pin storage and authentication? |
| 40 enum class PinStorageType { kPrefs, kCryptohome }; |
| 41 |
| 42 // Returns the pin storage type that should be used. IsPinEnabled() must |
| 43 // return true for this result to be valid. |
| 44 PinStorageType GetPinStorageType(); |
| 45 |
| 39 // Returns true if the fingerprint unlock feature flag is present. | 46 // Returns true if the fingerprint unlock feature flag is present. |
| 40 bool IsFingerprintEnabled(); | 47 bool IsFingerprintEnabled(); |
| 41 | 48 |
| 42 // Forcibly enable quick-unlock for testing. | 49 // Forcibly enable all quick-unlock modes for testing. |
| 43 void EnableForTesting(); | 50 void EnableForTesting(PinStorageType pin_storage_type); |
| 44 | 51 |
| 45 } // namespace quick_unlock | 52 } // namespace quick_unlock |
| 46 } // namespace chromeos | 53 } // namespace chromeos |
| 47 | 54 |
| 48 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_QUICK_UNLOCK_QUICK_UNLOCK_UTILS_H_ | 55 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_QUICK_UNLOCK_QUICK_UNLOCK_UTILS_H_ |
| OLD | NEW |