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
3 // found in the LICENSE file.
5 #include "chrome/browser/profiles/startup_task_runner_service_factory.h"
7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/profiles/startup_task_runner_service.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
11 StartupTaskRunnerServiceFactory::StartupTaskRunnerServiceFactory()
12 : BrowserContextKeyedServiceFactory(
13 "StartupTaskRunnerServiceFactory",
14 BrowserContextDependencyManager::GetInstance()) {
17 StartupTaskRunnerServiceFactory::~StartupTaskRunnerServiceFactory() {}
20 StartupTaskRunnerService
* StartupTaskRunnerServiceFactory::GetForProfile(
22 return static_cast<StartupTaskRunnerService
*>(
23 GetInstance()->GetServiceForBrowserContext(profile
, true));
27 StartupTaskRunnerServiceFactory
*
28 StartupTaskRunnerServiceFactory::GetInstance() {
29 return Singleton
<StartupTaskRunnerServiceFactory
>::get();
32 KeyedService
* StartupTaskRunnerServiceFactory::BuildServiceInstanceFor(
33 content::BrowserContext
* profile
) const {
34 return new StartupTaskRunnerService(static_cast<Profile
*>(profile
));