OLD | NEW |
(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 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.h" |
| 6 |
| 7 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h" |
| 8 #include "chrome/common/pref_names.h" |
| 9 #include "components/prefs/pref_service.h" |
| 10 |
| 11 namespace chromeos { |
| 12 namespace quick_unlock { |
| 13 |
| 14 QuickUnlockStorage::QuickUnlockStorage(PrefService* pref_service) { |
| 15 fingerprint_storage_ = base::MakeUnique<FingerprintStorage>(pref_service); |
| 16 pin_storage_ = base::MakeUnique<PinStorage>(pref_service); |
| 17 } |
| 18 |
| 19 QuickUnlockStorage::~QuickUnlockStorage() {} |
| 20 |
| 21 void QuickUnlockStorage::MarkStrongAuth() { |
| 22 fingerprint_storage()->MarkStrongAuth(); |
| 23 pin_storage()->MarkStrongAuth(); |
| 24 } |
| 25 |
| 26 FingerprintStorage* QuickUnlockStorage::fingerprint_storage() { |
| 27 return fingerprint_storage_.get(); |
| 28 } |
| 29 |
| 30 PinStorage* QuickUnlockStorage::pin_storage() { |
| 31 return pin_storage_.get(); |
| 32 } |
| 33 |
| 34 void QuickUnlockStorage::Shutdown() { |
| 35 fingerprint_storage_.reset(); |
| 36 pin_storage_.reset(); |
| 37 } |
| 38 |
| 39 } // namespace quick_unlock |
| 40 } // namespace chromeos |
OLD | NEW |