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

Unified Diff: chrome/browser/chromeos/login/quick_unlock/pin_storage.h

Issue 2387253002: cros: Added policies for screen unlock. (Closed)
Patch Set: Created 4 years, 2 months 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/pin_storage.h
diff --git a/chrome/browser/chromeos/login/quick_unlock/pin_storage.h b/chrome/browser/chromeos/login/quick_unlock/pin_storage.h
index f9fe72aadbecff1921e3716e0c1d82bf26680110..ba047347dc6fb38de3476b284db4abcf609b6a92 100644
--- a/chrome/browser/chromeos/login/quick_unlock/pin_storage.h
+++ b/chrome/browser/chromeos/login/quick_unlock/pin_storage.h
@@ -25,7 +25,6 @@ class PinStorage : public KeyedService {
public:
// TODO(jdufault): Pull these values in from policy. See crbug.com/612271.
static const int kMaximumUnlockAttempts = 3;
jdufault 2016/10/04 17:55:06 This value should be changeable using policy.
sammiequon 2016/10/18 22:47:49 I did not see this on the doc, but I will do it in
- static const base::TimeDelta kStrongAuthTimeout;
// Registers profile prefs.
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
@@ -39,6 +38,9 @@ class PinStorage : public KeyedService {
void MarkStrongAuth();
// Returns true if the user has been strongly authenticated.
bool HasStrongAuth() const;
jdufault 2016/10/04 17:55:06 Why did you decide to define NeedsStrongAuth separ
sammiequon 2016/10/18 22:47:49 I thought HasStrongAuth would be needed separately
jdufault 2016/10/21 19:03:44 The API is very confusing right now, I think it's
sammiequon 2016/10/21 23:49:24 Done.
+ // Returns true if the user last strong authentication was longer than the set
+ // preference. This should not be called if HasStrongAuth returns false.
+ bool NeedsStrongAuth() const;
// Returns the time since the last strong authentication. This should not be
// called if HasStrongAuth returns false.
base::TimeDelta TimeSinceLastStrongAuth() const;
@@ -56,6 +58,8 @@ class PinStorage : public KeyedService {
void SetPin(const std::string& pin);
// Removes the pin; IsPinSet will return false.
void RemovePin();
+ // Checks the to see if pin unlock enabled.
+ bool IsPinUnlockEnabled() const;
// Is PIN entry currently available?
bool IsPinAuthenticationAvailable() const;

Powered by Google App Engine
This is Rietveld 408576698