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

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

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.cc
diff --git a/chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.cc b/chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.cc
new file mode 100644
index 0000000000000000000000000000000000000000..4608ec8a692d3dddf75b4c6fed35f2dc28a1664b
--- /dev/null
+++ b/chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.cc
@@ -0,0 +1,40 @@
+// 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.
+
+#include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.h"
+
+#include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h"
+#include "chrome/common/pref_names.h"
+#include "components/prefs/pref_service.h"
+
+namespace chromeos {
+namespace quick_unlock {
+
+QuickUnlockStorage::QuickUnlockStorage(PrefService* pref_service) {
+ fingerprint_storage_ = base::MakeUnique<FingerprintStorage>(pref_service);
+ pin_storage_ = base::MakeUnique<PinStorage>(pref_service);
+}
+
+QuickUnlockStorage::~QuickUnlockStorage() {}
+
+void QuickUnlockStorage::MarkStrongAuth() {
+ fingerprint_storage()->MarkStrongAuth();
+ pin_storage()->MarkStrongAuth();
+}
+
+FingerprintStorage* QuickUnlockStorage::fingerprint_storage() {
+ return fingerprint_storage_.get();
+}
+
+PinStorage* QuickUnlockStorage::pin_storage() {
+ return pin_storage_.get();
+}
+
+void QuickUnlockStorage::Shutdown() {
+ fingerprint_storage_.reset();
+ pin_storage_.reset();
+}
+
+} // namespace quick_unlock
+} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698