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

Side by Side Diff: chrome/browser/chromeos/login/quick_unlock/fingerprint_storage.h

Issue 2715823004: Add FingerprintUnlock KeyedService for each profile (Closed)
Patch Set: rebase Created 3 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_QUICK_UNLOCK_FINGERPRINT_STORAGE_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_QUICK_UNLOCK_FINGERPRINT_STORAGE_H_
7
8 #include "base/time/time.h"
9
10 class PrefService;
11
12 namespace chromeos {
13
14 class FingerprintStorageTestApi;
15
16 namespace quick_unlock {
17
18 class QuickUnlockStorage;
19
20 class FingerprintStorage {
21 public:
22 static const int kMaximumUnlockAttempts = 5;
23
24 explicit FingerprintStorage(PrefService* pref_service);
25 ~FingerprintStorage();
26
27 // Returns true if the user has fingerprint enrollments registered.
28 bool HasEnrollment() const;
29
30 // Add a fingerprint unlock attempt count.
31 void AddUnlockAttempt();
32
33 // Reset the number of unlock attempts to 0.
34 void ResetUnlockAttemptCount();
35
36 int unlock_attempt_count() const { return unlock_attempt_count_; }
37
38 private:
39 friend class chromeos::FingerprintStorageTestApi;
40 friend class QuickUnlockStorage;
41
42 // Returns true if fingerprint unlock is currently available.
43 bool IsFingerprintAuthenticationAvailable() const;
44
45 PrefService* pref_service_;
46 // Number of fingerprint unlock attempt.
47 int unlock_attempt_count_ = 0;
48 bool has_enrollments_ = false;
49
50 DISALLOW_COPY_AND_ASSIGN(FingerprintStorage);
51 };
52
53 } // namespace quick_unlock
54 } // namespace chromeos
55
56 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_QUICK_UNLOCK_FINGERPRINT_STORAGE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/lock/screen_locker.cc ('k') | chrome/browser/chromeos/login/quick_unlock/fingerprint_storage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698