| 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 class PrefRegistrySimple; |
| 9 class PrefService; |
| 10 |
| 8 namespace chromeos { | 11 namespace chromeos { |
| 9 | 12 |
| 10 // Returns true if quick unlock is allowed by policy and the feature flag is | 13 // Enumeration specifiying the possible intervals before a strong auth |
| 11 // present. | 14 // (password) is required to use quick unlock. These values correspond to the |
| 12 bool IsQuickUnlockEnabled(); | 15 // policy items of QuickUnlockTimeout (policy ID 352) in policy_templates.json, |
| 16 // and should be updated accordingly. |
| 17 enum class QuickUnlockPasswordConfirmationFrequency { |
| 18 SIX_HOURS = 0, |
| 19 TWELVE_HOURS = 1, |
| 20 DAY = 2, |
| 21 WEEK = 3 |
| 22 }; |
| 23 |
| 24 // Register quick unlock prefs. |
| 25 void RegisterQuickUnlockProfilePrefs(PrefRegistrySimple* registry); |
| 26 |
| 27 // Returns true if PIN unlock is allowed by policy and the quick unlock feature |
| 28 // flag is present. |
| 29 bool IsPinUnlockEnabled(PrefService* pref_service); |
| 13 | 30 |
| 14 // Forcibly enable quick-unlock for testing. | 31 // Forcibly enable quick-unlock for testing. |
| 15 void EnableQuickUnlockForTesting(); | 32 void EnableQuickUnlockForTesting(); |
| 16 | 33 |
| 17 } // namespace chromeos | 34 } // namespace chromeos |
| 18 | 35 |
| 19 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_QUICK_UNLOCK_QUICK_UNLOCK_UTILS_H_ | 36 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_QUICK_UNLOCK_QUICK_UNLOCK_UTILS_H_ |
| OLD | NEW |