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

Side by Side Diff: chrome/browser/supervised_user/legacy/supervised_user_sync_service_factory.cc

Issue 1015013003: SupervisedUserSyncService cleanup: Implement SigninManagerBase::Observer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 5 years, 9 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
« no previous file with comments | « chrome/browser/supervised_user/legacy/supervised_user_sync_service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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/supervised_user/legacy/supervised_user_sync_service.h" 9 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h" 10 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10 11
11 // static 12 // static
12 SupervisedUserSyncService* SupervisedUserSyncServiceFactory::GetForProfile( 13 SupervisedUserSyncService* SupervisedUserSyncServiceFactory::GetForProfile(
13 Profile* profile) { 14 Profile* profile) {
14 return static_cast<SupervisedUserSyncService*>( 15 return static_cast<SupervisedUserSyncService*>(
15 GetInstance()->GetServiceForBrowserContext(profile, true)); 16 GetInstance()->GetServiceForBrowserContext(profile, true));
16 } 17 }
17 18
18 // static 19 // static
19 SupervisedUserSyncServiceFactory* 20 SupervisedUserSyncServiceFactory*
20 SupervisedUserSyncServiceFactory::GetInstance() { 21 SupervisedUserSyncServiceFactory::GetInstance() {
21 return Singleton<SupervisedUserSyncServiceFactory>::get(); 22 return Singleton<SupervisedUserSyncServiceFactory>::get();
22 } 23 }
23 24
24 SupervisedUserSyncServiceFactory::SupervisedUserSyncServiceFactory() 25 SupervisedUserSyncServiceFactory::SupervisedUserSyncServiceFactory()
25 : BrowserContextKeyedServiceFactory( 26 : BrowserContextKeyedServiceFactory(
26 "SupervisedUserSyncService", 27 "SupervisedUserSyncService",
27 BrowserContextDependencyManager::GetInstance()) { 28 BrowserContextDependencyManager::GetInstance()) {
29 DependsOn(SigninManagerFactory::GetInstance());
28 } 30 }
29 31
30 SupervisedUserSyncServiceFactory::~SupervisedUserSyncServiceFactory() {} 32 SupervisedUserSyncServiceFactory::~SupervisedUserSyncServiceFactory() {}
31 33
32 KeyedService* SupervisedUserSyncServiceFactory::BuildServiceInstanceFor( 34 KeyedService* SupervisedUserSyncServiceFactory::BuildServiceInstanceFor(
33 content::BrowserContext* profile) const { 35 content::BrowserContext* profile) const {
34 return new SupervisedUserSyncService( 36 return new SupervisedUserSyncService(
35 static_cast<Profile*>(profile)->GetPrefs()); 37 static_cast<Profile*>(profile));
36 } 38 }
OLDNEW
« no previous file with comments | « chrome/browser/supervised_user/legacy/supervised_user_sync_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698