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_BOOKMARK_SERVER_CLUSTER_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_ENHANCED_BOOKMARKS_BOOKMARK_SERVER_CLUSTER_SERVICE_FACTORY_H_
8 #include "base/macros.h"
9 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
12 struct DefaultSingletonTraits
;
14 namespace enhanced_bookmarks
{
16 class BookmarkServerClusterService
;
18 // A factory to create one unique BookmarkServerClusterService.
19 class BookmarkServerClusterServiceFactory
20 : public BrowserContextKeyedServiceFactory
{
22 static BookmarkServerClusterServiceFactory
* GetInstance();
23 static BookmarkServerClusterService
* GetForBrowserContext(
24 content::BrowserContext
* context
);
27 friend struct DefaultSingletonTraits
<BookmarkServerClusterServiceFactory
>;
29 BookmarkServerClusterServiceFactory();
30 ~BookmarkServerClusterServiceFactory() override
;
32 KeyedService
* BuildServiceInstanceFor(
33 content::BrowserContext
* context
) const override
;
35 content::BrowserContext
* GetBrowserContextToUse(
36 content::BrowserContext
* context
) const override
;
38 DISALLOW_COPY_AND_ASSIGN(BookmarkServerClusterServiceFactory
);
41 } // namespace enhanced_bookmarks
43 #endif // CHROME_BROWSER_ENHANCED_BOOKMARKS_BOOKMARK_SERVER_CLUSTER_SERVICE_FACTORY_H_