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

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

Issue 2387253002: cros: Added policies for screen unlock. (Closed)
Patch Set: Fixed patch set 1 errors. 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..2037b3b7fd5193744ef3bd0829edff18ac39c564 100644
--- a/chrome/browser/chromeos/login/quick_unlock/pin_storage.h
+++ b/chrome/browser/chromeos/login/quick_unlock/pin_storage.h
@@ -23,9 +23,8 @@ namespace chromeos {
class PinStorage : public KeyedService {
public:
- // TODO(jdufault): Pull these values in from policy. See crbug.com/612271.
+ // TODO(sammiequon): Pull this value in from policy. See crbug.com/612271.
static const int kMaximumUnlockAttempts = 3;
- 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;
+ // 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