1 // Copyright 2014 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_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_FACTORY_H_
6 #define CHROME_BROWSER_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_FACTORY_H_
8 #include "base/macros.h"
9 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
13 struct DefaultSingletonTraits
;
16 namespace enhanced_bookmarks
{
18 class EnhancedBookmarkModel
;
20 // A factory to create one unique EnhancedBookmarkModel.
21 class EnhancedBookmarkModelFactory
: public BrowserContextKeyedServiceFactory
{
23 static EnhancedBookmarkModelFactory
* GetInstance();
24 static EnhancedBookmarkModel
* GetForBrowserContext(
25 content::BrowserContext
* context
);
28 friend struct base::DefaultSingletonTraits
<EnhancedBookmarkModelFactory
>;
30 EnhancedBookmarkModelFactory();
31 ~EnhancedBookmarkModelFactory() override
{}
33 KeyedService
* BuildServiceInstanceFor(
34 content::BrowserContext
* context
) const override
;
36 content::BrowserContext
* GetBrowserContextToUse(
37 content::BrowserContext
* context
) const override
;
39 DISALLOW_COPY_AND_ASSIGN(EnhancedBookmarkModelFactory
);
42 } // namespace enhanced_bookmarks
44 #endif // CHROME_BROWSER_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_FACTORY_H_