1 // Copyright 2015 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_UI_BOOKMARKS_ENHANCED_BOOKMARK_KEY_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_UI_BOOKMARKS_ENHANCED_BOOKMARK_KEY_SERVICE_FACTORY_H_
8 #include "base/macros.h"
9 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
13 } // namespace content
15 template <typename T
> struct DefaultSingletonTraits
;
17 class EnhancedBookmarkKeyService
;
19 // Singleton that owns all EnhancedBookmarkKeyServices and associates them with
21 class EnhancedBookmarkKeyServiceFactory
22 : public BrowserContextKeyedServiceFactory
{
24 static EnhancedBookmarkKeyServiceFactory
* GetInstance();
27 friend struct DefaultSingletonTraits
<EnhancedBookmarkKeyServiceFactory
>;
29 EnhancedBookmarkKeyServiceFactory();
30 ~EnhancedBookmarkKeyServiceFactory() override
;
32 // BrowserContextKeyedServiceFactory:
33 KeyedService
* BuildServiceInstanceFor(
34 content::BrowserContext
* context
) const override
;
35 content::BrowserContext
* GetBrowserContextToUse(
36 content::BrowserContext
* context
) const override
;
37 bool ServiceIsCreatedWithBrowserContext() const override
;
38 bool ServiceIsNULLWhileTesting() const override
;
40 DISALLOW_COPY_AND_ASSIGN(EnhancedBookmarkKeyServiceFactory
);
43 #endif // CHROME_BROWSER_UI_BOOKMARKS_ENHANCED_BOOKMARK_KEY_SERVICE_FACTORY_H_