Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / bookmarks / startup_task_runner_service_factory.h
blob9450e418df5f55747002a1f4a580596a3c7c98b5
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 #ifndef CHROME_BROWSER_BOOKMARKS_STARTUP_TASK_RUNNER_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_BOOKMARKS_STARTUP_TASK_RUNNER_SERVICE_FACTORY_H_
8 #include "base/basictypes.h"
9 #include "base/memory/singleton.h"
10 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
12 class PrefRegistrySyncable;
13 class Profile;
15 namespace bookmarks {
16 class StartupTaskRunnerService;
19 // Singleton that owns the start-up task runner service.
20 class StartupTaskRunnerServiceFactory
21 : public BrowserContextKeyedServiceFactory {
22 public:
23 // Returns the instance of StartupTaskRunnerService associated with this
24 // profile (creating one if none exists).
25 static bookmarks::StartupTaskRunnerService* GetForProfile(Profile* profile);
27 // Returns an instance of the StartupTaskRunnerServiceFactory singleton.
28 static StartupTaskRunnerServiceFactory* GetInstance();
30 private:
31 friend struct base::DefaultSingletonTraits<StartupTaskRunnerServiceFactory>;
33 StartupTaskRunnerServiceFactory();
34 ~StartupTaskRunnerServiceFactory() override;
36 // BrowserContextKeyedServiceFactory:
37 KeyedService* BuildServiceInstanceFor(
38 content::BrowserContext* profile) const override;
40 DISALLOW_COPY_AND_ASSIGN(StartupTaskRunnerServiceFactory);
43 #endif // CHROME_BROWSER_BOOKMARKS_STARTUP_TASK_RUNNER_SERVICE_FACTORY_H_