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

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

Issue 2715823004: Add FingerprintUnlock KeyedService for each profile (Closed)
Patch Set: rebase 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_factory.cc
diff --git a/chrome/browser/chromeos/login/quick_unlock/pin_storage_factory.cc b/chrome/browser/chromeos/login/quick_unlock/quick_unlock_factory.cc
similarity index 54%
rename from chrome/browser/chromeos/login/quick_unlock/pin_storage_factory.cc
rename to chrome/browser/chromeos/login/quick_unlock/quick_unlock_factory.cc
index 773bdf3804977e7332a474216b29a5bf54d5adaf..49ccf7c595b8a8a8d922bc338d6e9da3f418f6b9 100644
--- a/chrome/browser/chromeos/login/quick_unlock/pin_storage_factory.cc
+++ b/chrome/browser/chromeos/login/quick_unlock/quick_unlock_factory.cc
@@ -1,10 +1,10 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
+// 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/pin_storage_factory.h"
+#include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_factory.h"
-#include "chrome/browser/chromeos/login/quick_unlock/pin_storage.h"
+#include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
@@ -15,13 +15,14 @@ namespace chromeos {
namespace quick_unlock {
// static
-PinStorage* PinStorageFactory::GetForProfile(Profile* profile) {
- return static_cast<PinStorage*>(
+QuickUnlockStorage* QuickUnlockFactory::GetForProfile(Profile* profile) {
+ return static_cast<QuickUnlockStorage*>(
GetInstance()->GetServiceForBrowserContext(profile, true));
}
// static
-PinStorage* PinStorageFactory::GetForUser(const user_manager::User* user) {
+QuickUnlockStorage* QuickUnlockFactory::GetForUser(
+ const user_manager::User* user) {
Profile* profile = ProfileHelper::Get()->GetProfileByUser(user);
if (!profile)
return nullptr;
@@ -30,7 +31,8 @@ PinStorage* PinStorageFactory::GetForUser(const user_manager::User* user) {
}
// static
-PinStorage* PinStorageFactory::GetForAccountId(const AccountId& account_id) {
+QuickUnlockStorage* QuickUnlockFactory::GetForAccountId(
+ const AccountId& account_id) {
const user_manager::User* user =
user_manager::UserManager::Get()->FindUser(account_id);
if (!user)
@@ -40,20 +42,21 @@ PinStorage* PinStorageFactory::GetForAccountId(const AccountId& account_id) {
}
// static
-PinStorageFactory* PinStorageFactory::GetInstance() {
- return base::Singleton<PinStorageFactory>::get();
+QuickUnlockFactory* QuickUnlockFactory::GetInstance() {
+ return base::Singleton<QuickUnlockFactory>::get();
}
-PinStorageFactory::PinStorageFactory()
+QuickUnlockFactory::QuickUnlockFactory()
: BrowserContextKeyedServiceFactory(
- "PinStorageFactory",
+ "QuickUnlockFactory",
BrowserContextDependencyManager::GetInstance()) {}
-PinStorageFactory::~PinStorageFactory() {}
+QuickUnlockFactory::~QuickUnlockFactory() {}
-KeyedService* PinStorageFactory::BuildServiceInstanceFor(
+KeyedService* QuickUnlockFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
- return new PinStorage(Profile::FromBrowserContext(context)->GetPrefs());
+ return new QuickUnlockStorage(
+ Profile::FromBrowserContext(context)->GetPrefs());
}
} // namespace quick_unlock

Powered by Google App Engine
This is Rietveld 408576698