| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/profiles/startup_task_runner_service_factory.h" | 5 #include "chrome/browser/profiles/startup_task_runner_service_factory.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/profiles/startup_task_runner_service.h" | 8 #include "chrome/browser/profiles/startup_task_runner_service.h" |
| 9 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" | 9 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" |
| 10 | 10 |
| 11 StartupTaskRunnerServiceFactory::StartupTaskRunnerServiceFactory() | 11 StartupTaskRunnerServiceFactory::StartupTaskRunnerServiceFactory() |
| 12 : ProfileKeyedServiceFactory("StartupTaskRunnerServiceFactory", | 12 : BrowserContextKeyedServiceFactory("StartupTaskRunnerServiceFactory", |
| 13 ProfileDependencyManager::GetInstance()) { | 13 BrowserContextDependencyManager::GetInstance())
{ |
| 14 } | 14 } |
| 15 | 15 |
| 16 StartupTaskRunnerServiceFactory::~StartupTaskRunnerServiceFactory() {} | 16 StartupTaskRunnerServiceFactory::~StartupTaskRunnerServiceFactory() {} |
| 17 | 17 |
| 18 // static | 18 // static |
| 19 StartupTaskRunnerService* StartupTaskRunnerServiceFactory::GetForProfile( | 19 StartupTaskRunnerService* StartupTaskRunnerServiceFactory::GetForProfile( |
| 20 Profile* profile) { | 20 Profile* profile) { |
| 21 return static_cast<StartupTaskRunnerService*>( | 21 return static_cast<StartupTaskRunnerService*>( |
| 22 GetInstance()->GetServiceForProfile(profile, true)); | 22 GetInstance()->GetServiceForBrowserContext(profile, true)); |
| 23 } | 23 } |
| 24 | 24 |
| 25 // static | 25 // static |
| 26 StartupTaskRunnerServiceFactory* | 26 StartupTaskRunnerServiceFactory* |
| 27 StartupTaskRunnerServiceFactory::GetInstance() { | 27 StartupTaskRunnerServiceFactory::GetInstance() { |
| 28 return Singleton<StartupTaskRunnerServiceFactory>::get(); | 28 return Singleton<StartupTaskRunnerServiceFactory>::get(); |
| 29 } | 29 } |
| 30 | 30 |
| 31 ProfileKeyedService* StartupTaskRunnerServiceFactory::BuildServiceInstanceFor( | 31 BrowserContextKeyedService* StartupTaskRunnerServiceFactory::BuildServiceInstanc
eFor( |
| 32 content::BrowserContext* profile) const { | 32 content::BrowserContext* profile) const { |
| 33 return new StartupTaskRunnerService(static_cast<Profile*>(profile)); | 33 return new StartupTaskRunnerService(static_cast<Profile*>(profile)); |
| 34 } | 34 } |
| OLD | NEW |