OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_factory.h" | 5 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_factory.h" |
6 | 6 |
7 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.h" | 7 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.h" |
8 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 8 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 10 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 QuickUnlockFactory::QuickUnlockFactory() | 49 QuickUnlockFactory::QuickUnlockFactory() |
50 : BrowserContextKeyedServiceFactory( | 50 : BrowserContextKeyedServiceFactory( |
51 "QuickUnlockFactory", | 51 "QuickUnlockFactory", |
52 BrowserContextDependencyManager::GetInstance()) {} | 52 BrowserContextDependencyManager::GetInstance()) {} |
53 | 53 |
54 QuickUnlockFactory::~QuickUnlockFactory() {} | 54 QuickUnlockFactory::~QuickUnlockFactory() {} |
55 | 55 |
56 KeyedService* QuickUnlockFactory::BuildServiceInstanceFor( | 56 KeyedService* QuickUnlockFactory::BuildServiceInstanceFor( |
57 content::BrowserContext* context) const { | 57 content::BrowserContext* context) const { |
58 return new QuickUnlockStorage( | 58 return new QuickUnlockStorage(Profile::FromBrowserContext(context)); |
59 Profile::FromBrowserContext(context)->GetPrefs()); | |
60 } | 59 } |
61 | 60 |
62 } // namespace quick_unlock | 61 } // namespace quick_unlock |
63 } // namespace chromeos | 62 } // namespace chromeos |
OLD | NEW |