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

Side by Side Diff: chrome/browser/supervised_user/supervised_user_service_factory.cc

Issue 428143002: Sync: Add a SyncTypePreferenceProvider interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 6 years, 4 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 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/supervised_user_service_factory.h" 5 #include "chrome/browser/supervised_user/supervised_user_service_factory.h"
6 6
7 #include "chrome/browser/profiles/incognito_helpers.h" 7 #include "chrome/browser/profiles/incognito_helpers.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 9 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
10 #include "chrome/browser/supervised_user/supervised_user_service.h" 10 #include "chrome/browser/supervised_user/supervised_user_service.h"
11 #include "chrome/browser/sync/profile_sync_service_factory.h"
11 #include "components/keyed_service/content/browser_context_dependency_manager.h" 12 #include "components/keyed_service/content/browser_context_dependency_manager.h"
12 13
13 #if defined(ENABLE_EXTENSIONS) 14 #if defined(ENABLE_EXTENSIONS)
14 #include "extensions/browser/extension_system_provider.h" 15 #include "extensions/browser/extension_system_provider.h"
15 #include "extensions/browser/extensions_browser_client.h" 16 #include "extensions/browser/extensions_browser_client.h"
16 #endif 17 #endif
17 18
18 // static 19 // static
19 SupervisedUserService* SupervisedUserServiceFactory::GetForProfile( 20 SupervisedUserService* SupervisedUserServiceFactory::GetForProfile(
20 Profile* profile) { 21 Profile* profile) {
(...skipping 13 matching lines...) Expand all
34 35
35 SupervisedUserServiceFactory::SupervisedUserServiceFactory() 36 SupervisedUserServiceFactory::SupervisedUserServiceFactory()
36 : BrowserContextKeyedServiceFactory( 37 : BrowserContextKeyedServiceFactory(
37 "SupervisedUserService", 38 "SupervisedUserService",
38 BrowserContextDependencyManager::GetInstance()) { 39 BrowserContextDependencyManager::GetInstance()) {
39 #if defined(ENABLE_EXTENSIONS) 40 #if defined(ENABLE_EXTENSIONS)
40 DependsOn( 41 DependsOn(
41 extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); 42 extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory());
42 #endif 43 #endif
43 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); 44 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance());
45 DependsOn(ProfileSyncServiceFactory::GetInstance());
44 } 46 }
45 47
46 SupervisedUserServiceFactory::~SupervisedUserServiceFactory() {} 48 SupervisedUserServiceFactory::~SupervisedUserServiceFactory() {}
47 49
48 content::BrowserContext* SupervisedUserServiceFactory::GetBrowserContextToUse( 50 content::BrowserContext* SupervisedUserServiceFactory::GetBrowserContextToUse(
49 content::BrowserContext* context) const { 51 content::BrowserContext* context) const {
50 return chrome::GetBrowserContextRedirectedInIncognito(context); 52 return chrome::GetBrowserContextRedirectedInIncognito(context);
51 } 53 }
52 54
53 KeyedService* SupervisedUserServiceFactory::BuildServiceInstanceFor( 55 KeyedService* SupervisedUserServiceFactory::BuildServiceInstanceFor(
54 content::BrowserContext* profile) const { 56 content::BrowserContext* profile) const {
55 return BuildInstanceFor(static_cast<Profile*>(profile)); 57 return BuildInstanceFor(static_cast<Profile*>(profile));
56 } 58 }
OLDNEW
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_service.cc ('k') | chrome/browser/sync/profile_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698