OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/supervised_user/chromeos/supervised_user_password_servi
ce_factory.h" | 5 #include "chrome/browser/supervised_user/chromeos/supervised_user_password_servi
ce_factory.h" |
6 | 6 |
7 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" | 7 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" |
8 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 8 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
9 #include "chrome/browser/profiles/incognito_helpers.h" | 9 #include "chrome/browser/profiles/incognito_helpers.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/browser/supervised_user/chromeos/supervised_user_password_servi
ce.h" | 11 #include "chrome/browser/supervised_user/chromeos/supervised_user_password_servi
ce.h" |
12 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_
service_factory.h" | 12 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_
service_factory.h" |
13 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 13 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
14 #include "components/user_manager/user.h" | 14 #include "components/user_manager/user.h" |
15 #include "components/user_manager/user_type.h" | 15 #include "components/user_manager/user_type.h" |
16 | 16 |
17 namespace chromeos { | 17 namespace chromeos { |
18 | 18 |
19 // static | 19 // static |
20 SupervisedUserPasswordService* | 20 SupervisedUserPasswordService* |
21 SupervisedUserPasswordServiceFactory::GetForProfile(Profile* profile) { | 21 SupervisedUserPasswordServiceFactory::GetForProfile(Profile* profile) { |
22 return static_cast<SupervisedUserPasswordService*>( | 22 return static_cast<SupervisedUserPasswordService*>( |
23 GetInstance()->GetServiceForBrowserContext(profile, true)); | 23 GetInstance()->GetServiceForBrowserContext(profile, true)); |
24 } | 24 } |
25 | 25 |
26 // static | 26 // static |
27 SupervisedUserPasswordServiceFactory* | 27 SupervisedUserPasswordServiceFactory* |
28 SupervisedUserPasswordServiceFactory::GetInstance() { | 28 SupervisedUserPasswordServiceFactory::GetInstance() { |
29 return Singleton<SupervisedUserPasswordServiceFactory>::get(); | 29 return base::Singleton<SupervisedUserPasswordServiceFactory>::get(); |
30 } | 30 } |
31 | 31 |
32 SupervisedUserPasswordServiceFactory::SupervisedUserPasswordServiceFactory() | 32 SupervisedUserPasswordServiceFactory::SupervisedUserPasswordServiceFactory() |
33 : BrowserContextKeyedServiceFactory( | 33 : BrowserContextKeyedServiceFactory( |
34 "SupervisedUserPasswordService", | 34 "SupervisedUserPasswordService", |
35 BrowserContextDependencyManager::GetInstance()) { | 35 BrowserContextDependencyManager::GetInstance()) { |
36 DependsOn(SupervisedUserSharedSettingsServiceFactory::GetInstance()); | 36 DependsOn(SupervisedUserSharedSettingsServiceFactory::GetInstance()); |
37 } | 37 } |
38 | 38 |
39 SupervisedUserPasswordServiceFactory:: | 39 SupervisedUserPasswordServiceFactory:: |
(...skipping 14 matching lines...) Expand all Loading... |
54 return result; | 54 return result; |
55 } | 55 } |
56 | 56 |
57 content::BrowserContext* | 57 content::BrowserContext* |
58 SupervisedUserPasswordServiceFactory::GetBrowserContextToUse( | 58 SupervisedUserPasswordServiceFactory::GetBrowserContextToUse( |
59 content::BrowserContext* context) const { | 59 content::BrowserContext* context) const { |
60 return chrome::GetBrowserContextRedirectedInIncognito(context); | 60 return chrome::GetBrowserContextRedirectedInIncognito(context); |
61 } | 61 } |
62 | 62 |
63 } // namespace chromeos | 63 } // namespace chromeos |
OLD | NEW |