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 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h" | 5 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h" |
6 | 6 |
7 #include "base/feature_list.h" | 7 #include "base/feature_list.h" |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 10 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 return base::TimeDelta::FromDays(7); | 39 return base::TimeDelta::FromDays(7); |
40 } | 40 } |
41 NOTREACHED(); | 41 NOTREACHED(); |
42 return base::TimeDelta(); | 42 return base::TimeDelta(); |
43 } | 43 } |
44 | 44 |
45 void RegisterProfilePrefs(PrefRegistrySimple* registry) { | 45 void RegisterProfilePrefs(PrefRegistrySimple* registry) { |
46 base::ListValue quick_unlock_whitelist_default; | 46 base::ListValue quick_unlock_whitelist_default; |
47 quick_unlock_whitelist_default.AppendString(kQuickUnlockWhitelistOptionPin); | 47 quick_unlock_whitelist_default.AppendString(kQuickUnlockWhitelistOptionPin); |
48 registry->RegisterListPref(prefs::kQuickUnlockModeWhitelist, | 48 registry->RegisterListPref(prefs::kQuickUnlockModeWhitelist, |
49 quick_unlock_whitelist_default.DeepCopy()); | 49 quick_unlock_whitelist_default.CreateDeepCopy()); |
50 registry->RegisterIntegerPref( | 50 registry->RegisterIntegerPref( |
51 prefs::kQuickUnlockTimeout, | 51 prefs::kQuickUnlockTimeout, |
52 static_cast<int>(PasswordConfirmationFrequency::DAY)); | 52 static_cast<int>(PasswordConfirmationFrequency::DAY)); |
53 | 53 |
54 // Preferences related the lock screen pin unlock. | 54 // Preferences related the lock screen pin unlock. |
55 registry->RegisterIntegerPref(prefs::kPinUnlockMinimumLength, | 55 registry->RegisterIntegerPref(prefs::kPinUnlockMinimumLength, |
56 kDefaultMinimumPinLength); | 56 kDefaultMinimumPinLength); |
57 // 0 indicates no maximum length for the pin. | 57 // 0 indicates no maximum length for the pin. |
58 registry->RegisterIntegerPref(prefs::kPinUnlockMaximumLength, 0); | 58 registry->RegisterIntegerPref(prefs::kPinUnlockMaximumLength, 0); |
59 registry->RegisterBooleanPref(prefs::kPinUnlockWeakPinsAllowed, true); | 59 registry->RegisterBooleanPref(prefs::kPinUnlockWeakPinsAllowed, true); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // Enable fingerprint unlock only if the switch is present. | 94 // Enable fingerprint unlock only if the switch is present. |
95 return base::FeatureList::IsEnabled(features::kQuickUnlockFingerprint); | 95 return base::FeatureList::IsEnabled(features::kQuickUnlockFingerprint); |
96 } | 96 } |
97 | 97 |
98 void EnableForTesting() { | 98 void EnableForTesting() { |
99 enable_for_testing_ = true; | 99 enable_for_testing_ = true; |
100 } | 100 } |
101 | 101 |
102 } // namespace quick_unlock | 102 } // namespace quick_unlock |
103 } // namespace chromeos | 103 } // namespace chromeos |
OLD | NEW |