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

Side by Side Diff: chrome/browser/supervised_user/child_accounts/child_account_service_factory.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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 unified diff | Download patch
OLDNEW
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/child_accounts/child_account_service_fa ctory.h" 5 #include "chrome/browser/supervised_user/child_accounts/child_account_service_fa ctory.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/signin/account_tracker_service_factory.h" 8 #include "chrome/browser/signin/account_tracker_service_factory.h"
9 #include "chrome/browser/signin/signin_manager_factory.h" 9 #include "chrome/browser/signin/signin_manager_factory.h"
10 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" 10 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h"
11 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" 11 #include "chrome/browser/supervised_user/supervised_user_service_factory.h"
12 #include "components/keyed_service/content/browser_context_dependency_manager.h" 12 #include "components/keyed_service/content/browser_context_dependency_manager.h"
13 13
14 // static 14 // static
15 ChildAccountService* ChildAccountServiceFactory::GetForProfile( 15 ChildAccountService* ChildAccountServiceFactory::GetForProfile(
16 Profile* profile) { 16 Profile* profile) {
17 return static_cast<ChildAccountService*>( 17 return static_cast<ChildAccountService*>(
18 GetInstance()->GetServiceForBrowserContext(profile, true)); 18 GetInstance()->GetServiceForBrowserContext(profile, true));
19 } 19 }
20 20
21 // static 21 // static
22 ChildAccountServiceFactory* ChildAccountServiceFactory::GetInstance() { 22 ChildAccountServiceFactory* ChildAccountServiceFactory::GetInstance() {
23 return Singleton<ChildAccountServiceFactory>::get(); 23 return base::Singleton<ChildAccountServiceFactory>::get();
24 } 24 }
25 25
26 ChildAccountServiceFactory::ChildAccountServiceFactory() 26 ChildAccountServiceFactory::ChildAccountServiceFactory()
27 : BrowserContextKeyedServiceFactory( 27 : BrowserContextKeyedServiceFactory(
28 "ChildAccountService", 28 "ChildAccountService",
29 BrowserContextDependencyManager::GetInstance()) { 29 BrowserContextDependencyManager::GetInstance()) {
30 DependsOn(AccountTrackerServiceFactory::GetInstance()); 30 DependsOn(AccountTrackerServiceFactory::GetInstance());
31 DependsOn(SigninManagerFactory::GetInstance()); 31 DependsOn(SigninManagerFactory::GetInstance());
32 DependsOn(SupervisedUserServiceFactory::GetInstance()); 32 DependsOn(SupervisedUserServiceFactory::GetInstance());
33 } 33 }
34 34
35 ChildAccountServiceFactory::~ChildAccountServiceFactory() {} 35 ChildAccountServiceFactory::~ChildAccountServiceFactory() {}
36 36
37 KeyedService* ChildAccountServiceFactory::BuildServiceInstanceFor( 37 KeyedService* ChildAccountServiceFactory::BuildServiceInstanceFor(
38 content::BrowserContext* profile) const { 38 content::BrowserContext* profile) const {
39 return new ChildAccountService(static_cast<Profile*>(profile)); 39 return new ChildAccountService(static_cast<Profile*>(profile));
40 } 40 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698