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

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

Issue 2715823004: Add FingerprintUnlock KeyedService for each profile (Closed)
Patch Set: Incorporate comments Created 3 years, 10 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/quick_unlock_storage.h
diff --git a/chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.h b/chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.h
new file mode 100644
index 0000000000000000000000000000000000000000..20ba9a9bccb1a5114fbfb94697aa858a3a2d74f0
--- /dev/null
+++ b/chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.h
@@ -0,0 +1,46 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_QUICK_UNLOCK_QUICK_UNLOCK_STORAGE_H_
+#define CHROME_BROWSER_CHROMEOS_LOGIN_QUICK_UNLOCK_QUICK_UNLOCK_STORAGE_H_
+
+#include "base/memory/ptr_util.h"
+#include "chrome/browser/chromeos/login/quick_unlock/fingerprint_storage.h"
+#include "chrome/browser/chromeos/login/quick_unlock/pin_storage.h"
+#include "components/keyed_service/core/keyed_service.h"
+
+class PrefService;
+
+namespace chromeos {
+
+namespace quick_unlock {
+
+class QuickUnlockStorage : public KeyedService {
+ public:
+ explicit QuickUnlockStorage(PrefService* pref_service);
+ ~QuickUnlockStorage() override;
+
+ // Mark that the user has had a strong authentication. This means
+ // that they authenticated with their password, for example. Quick
+ // unlock will timeout after a delay.
+ void MarkStrongAuth();
+
+ FingerprintStorage* fingerprint_storage();
+
+ PinStorage* pin_storage();
+
+ private:
+ // KeyedService:
+ void Shutdown() override;
+
+ std::unique_ptr<FingerprintStorage> fingerprint_storage_;
+ std::unique_ptr<PinStorage> pin_storage_;
+
+ DISALLOW_COPY_AND_ASSIGN(QuickUnlockStorage);
+};
+
+} // namespace quick_unlock
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_QUICK_UNLOCK_QUICK_UNLOCK_STORAGE_H_

Powered by Google App Engine
This is Rietveld 408576698