| 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/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" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 SupervisedUserServiceFactory::SupervisedUserServiceFactory() | 37 SupervisedUserServiceFactory::SupervisedUserServiceFactory() |
| 38 : BrowserContextKeyedServiceFactory( | 38 : BrowserContextKeyedServiceFactory( |
| 39 "SupervisedUserService", | 39 "SupervisedUserService", |
| 40 BrowserContextDependencyManager::GetInstance()) { | 40 BrowserContextDependencyManager::GetInstance()) { |
| 41 #if BUILDFLAG(ENABLE_EXTENSIONS) | 41 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 42 DependsOn( | 42 DependsOn( |
| 43 extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); | 43 extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); |
| 44 #endif | 44 #endif |
| 45 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); | 45 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); |
| 46 |
| 47 // TODO(skym, crbug.com/705545): Fix this circular dependency. |
| 46 DependsOn(ProfileSyncServiceFactory::GetInstance()); | 48 DependsOn(ProfileSyncServiceFactory::GetInstance()); |
| 47 } | 49 } |
| 48 | 50 |
| 49 SupervisedUserServiceFactory::~SupervisedUserServiceFactory() {} | 51 SupervisedUserServiceFactory::~SupervisedUserServiceFactory() {} |
| 50 | 52 |
| 51 content::BrowserContext* SupervisedUserServiceFactory::GetBrowserContextToUse( | 53 content::BrowserContext* SupervisedUserServiceFactory::GetBrowserContextToUse( |
| 52 content::BrowserContext* context) const { | 54 content::BrowserContext* context) const { |
| 53 return chrome::GetBrowserContextRedirectedInIncognito(context); | 55 return chrome::GetBrowserContextRedirectedInIncognito(context); |
| 54 } | 56 } |
| 55 | 57 |
| 56 KeyedService* SupervisedUserServiceFactory::BuildServiceInstanceFor( | 58 KeyedService* SupervisedUserServiceFactory::BuildServiceInstanceFor( |
| 57 content::BrowserContext* profile) const { | 59 content::BrowserContext* profile) const { |
| 58 return BuildInstanceFor(static_cast<Profile*>(profile)); | 60 return BuildInstanceFor(static_cast<Profile*>(profile)); |
| 59 } | 61 } |
| OLD | NEW |