summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profiles/startup_task_runner_service_factory.cc
blob: eaff6a865c35365628ee30e0f8e3a44c8035a2c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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);
}