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

Side by Side Diff: chrome/browser/managed_mode/managed_user_registration_service_factory.cc

Issue 15517005: Remove references to Profile from browser_context_keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & style Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/managed_mode/managed_user_registration_service_factory. h" 5 #include "chrome/browser/managed_mode/managed_user_registration_service_factory. h"
6 6
7 #include "chrome/browser/managed_mode/managed_user_registration_service.h" 7 #include "chrome/browser/managed_mode/managed_user_registration_service.h"
8 #include "components/browser_context_keyed_service/browser_context_dependency_ma nager.h" 8 #include "components/browser_context_keyed_service/browser_context_dependency_ma nager.h"
9 9
10 // static 10 // static
11 ManagedUserRegistrationService* 11 ManagedUserRegistrationService*
12 ManagedUserRegistrationServiceFactory::GetForProfile(Profile* profile) { 12 ManagedUserRegistrationServiceFactory::GetForProfile(Profile* profile) {
13 return static_cast<ManagedUserRegistrationService*>( 13 return static_cast<ManagedUserRegistrationService*>(
14 GetInstance()->GetServiceForProfile(profile, true)); 14 GetInstance()->GetServiceForBrowserContext(profile, true));
15 } 15 }
16 16
17 // static 17 // static
18 ManagedUserRegistrationServiceFactory* 18 ManagedUserRegistrationServiceFactory*
19 ManagedUserRegistrationServiceFactory::GetInstance() { 19 ManagedUserRegistrationServiceFactory::GetInstance() {
20 return Singleton<ManagedUserRegistrationServiceFactory>::get(); 20 return Singleton<ManagedUserRegistrationServiceFactory>::get();
21 } 21 }
22 22
23 // static 23 // static
24 ProfileKeyedService* ManagedUserRegistrationServiceFactory::BuildInstanceFor( 24 BrowserContextKeyedService*
25 Profile* profile) { 25 ManagedUserRegistrationServiceFactory::BuildInstanceFor(Profile* profile) {
26 return new ManagedUserRegistrationService(); 26 return new ManagedUserRegistrationService();
27 } 27 }
28 28
29 ManagedUserRegistrationServiceFactory::ManagedUserRegistrationServiceFactory() 29 ManagedUserRegistrationServiceFactory::ManagedUserRegistrationServiceFactory()
30 : ProfileKeyedServiceFactory("ManagedUserRegistrationService", 30 : BrowserContextKeyedServiceFactory(
31 ProfileDependencyManager::GetInstance()) { 31 "ManagedUserRegistrationService",
32 BrowserContextDependencyManager::GetInstance()) {
32 } 33 }
33 34
34 ManagedUserRegistrationServiceFactory:: 35 ManagedUserRegistrationServiceFactory::
35 ~ManagedUserRegistrationServiceFactory() {} 36 ~ManagedUserRegistrationServiceFactory() {}
36 37
37 ProfileKeyedService* 38 BrowserContextKeyedService*
38 ManagedUserRegistrationServiceFactory::BuildServiceInstanceFor( 39 ManagedUserRegistrationServiceFactory::BuildServiceInstanceFor(
39 content::BrowserContext* profile) const { 40 content::BrowserContext* profile) const {
40 return BuildInstanceFor(static_cast<Profile*>(profile)); 41 return BuildInstanceFor(static_cast<Profile*>(profile));
41 } 42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698