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/legacy/supervised_user_sync_service_fac
tory.h" | 5 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service_fac
tory.h" |
6 | 6 |
7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/signin/signin_manager_factory.h" | 8 #include "chrome/browser/signin/signin_manager_factory.h" |
9 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h" | 9 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h" |
10 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 10 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
11 | 11 |
12 // static | 12 // static |
13 SupervisedUserSyncService* SupervisedUserSyncServiceFactory::GetForProfile( | 13 SupervisedUserSyncService* SupervisedUserSyncServiceFactory::GetForProfile( |
14 Profile* profile) { | 14 Profile* profile) { |
15 return static_cast<SupervisedUserSyncService*>( | 15 return static_cast<SupervisedUserSyncService*>( |
16 GetInstance()->GetServiceForBrowserContext(profile, true)); | 16 GetInstance()->GetServiceForBrowserContext(profile, true)); |
17 } | 17 } |
18 | 18 |
19 // static | 19 // static |
20 SupervisedUserSyncServiceFactory* | 20 SupervisedUserSyncServiceFactory* |
21 SupervisedUserSyncServiceFactory::GetInstance() { | 21 SupervisedUserSyncServiceFactory::GetInstance() { |
22 return Singleton<SupervisedUserSyncServiceFactory>::get(); | 22 return base::Singleton<SupervisedUserSyncServiceFactory>::get(); |
23 } | 23 } |
24 | 24 |
25 SupervisedUserSyncServiceFactory::SupervisedUserSyncServiceFactory() | 25 SupervisedUserSyncServiceFactory::SupervisedUserSyncServiceFactory() |
26 : BrowserContextKeyedServiceFactory( | 26 : BrowserContextKeyedServiceFactory( |
27 "SupervisedUserSyncService", | 27 "SupervisedUserSyncService", |
28 BrowserContextDependencyManager::GetInstance()) { | 28 BrowserContextDependencyManager::GetInstance()) { |
29 DependsOn(SigninManagerFactory::GetInstance()); | 29 DependsOn(SigninManagerFactory::GetInstance()); |
30 } | 30 } |
31 | 31 |
32 SupervisedUserSyncServiceFactory::~SupervisedUserSyncServiceFactory() {} | 32 SupervisedUserSyncServiceFactory::~SupervisedUserSyncServiceFactory() {} |
33 | 33 |
34 KeyedService* SupervisedUserSyncServiceFactory::BuildServiceInstanceFor( | 34 KeyedService* SupervisedUserSyncServiceFactory::BuildServiceInstanceFor( |
35 content::BrowserContext* profile) const { | 35 content::BrowserContext* profile) const { |
36 return new SupervisedUserSyncService( | 36 return new SupervisedUserSyncService( |
37 static_cast<Profile*>(profile)); | 37 static_cast<Profile*>(profile)); |
38 } | 38 } |
OLD | NEW |