OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_PROFILES_STARTUP_TASK_RUNNER_SERVICE_FACTORY_H_ |
| 6 #define CHROME_BROWSER_PROFILES_STARTUP_TASK_RUNNER_SERVICE_FACTORY_H_ |
| 7 |
| 8 #include "base/memory/singleton.h" |
| 9 #include "chrome/browser/profiles/profile_keyed_service_factory.h" |
| 10 |
| 11 class StartupTaskRunnerService; |
| 12 class PrefRegistrySyncable; |
| 13 class Profile; |
| 14 |
| 15 // Singleton that owns the start-up task runner service. |
| 16 class StartupTaskRunnerServiceFactory : public ProfileKeyedServiceFactory { |
| 17 public: |
| 18 // Returns the instance of StartupTaskRunnerService associated with this |
| 19 // profile (creating one if none exists). |
| 20 static StartupTaskRunnerService* GetForProfile(Profile* profile); |
| 21 |
| 22 // Returns an instance of the StartupTaskRunnerServiceFactory singleton. |
| 23 static StartupTaskRunnerServiceFactory* GetInstance(); |
| 24 |
| 25 private: |
| 26 friend struct DefaultSingletonTraits<StartupTaskRunnerServiceFactory>; |
| 27 |
| 28 StartupTaskRunnerServiceFactory(); |
| 29 virtual ~StartupTaskRunnerServiceFactory(); |
| 30 |
| 31 // ProfileKeyedServiceFactory: |
| 32 virtual ProfileKeyedService* BuildServiceInstanceFor( |
| 33 Profile* profile) const OVERRIDE; |
| 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(StartupTaskRunnerServiceFactory); |
| 36 }; |
| 37 |
| 38 #endif // CHROME_BROWSER_PROFILES_STARTUP_TASK_RUNNER_SERVICE_FACTORY_H_ |
OLD | NEW |