diff options
Diffstat (limited to 'chrome/browser/profiles/startup_task_runner_service_factory.cc')
-rw-r--r-- | chrome/browser/profiles/startup_task_runner_service_factory.cc | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/chrome/browser/profiles/startup_task_runner_service_factory.cc b/chrome/browser/profiles/startup_task_runner_service_factory.cc new file mode 100644 index 0000000..eaff6a8 --- /dev/null +++ b/chrome/browser/profiles/startup_task_runner_service_factory.cc @@ -0,0 +1,33 @@ +// Copyright (c) 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/profiles/startup_task_runner_service_factory.h" + +#include "chrome/browser/profiles/profile_dependency_manager.h" +#include "chrome/browser/profiles/startup_task_runner_service.h" + +StartupTaskRunnerServiceFactory::StartupTaskRunnerServiceFactory() + : ProfileKeyedServiceFactory("StartupTaskRunnerServiceFactory", + ProfileDependencyManager::GetInstance()) { +} + +StartupTaskRunnerServiceFactory::~StartupTaskRunnerServiceFactory() {} + +// static +StartupTaskRunnerService* StartupTaskRunnerServiceFactory::GetForProfile( + Profile* profile) { + return static_cast<StartupTaskRunnerService*>( + GetInstance()->GetServiceForProfile(profile, true)); +} + +// static +StartupTaskRunnerServiceFactory* + StartupTaskRunnerServiceFactory::GetInstance() { + return Singleton<StartupTaskRunnerServiceFactory>::get(); +} + +ProfileKeyedService* StartupTaskRunnerServiceFactory::BuildServiceInstanceFor( + Profile* profile) const { + return new StartupTaskRunnerService(profile); +} |