OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_ENHANCED_BOOKMARKS_BOOKMARK_SERVER_CLUSTER_SERVICE_FACTOR
Y_H_ | 5 #ifndef CHROME_BROWSER_ENHANCED_BOOKMARKS_BOOKMARK_SERVER_CLUSTER_SERVICE_FACTOR
Y_H_ |
6 #define CHROME_BROWSER_ENHANCED_BOOKMARKS_BOOKMARK_SERVER_CLUSTER_SERVICE_FACTOR
Y_H_ | 6 #define CHROME_BROWSER_ENHANCED_BOOKMARKS_BOOKMARK_SERVER_CLUSTER_SERVICE_FACTOR
Y_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 9 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
10 | 10 |
| 11 namespace base { |
11 template <typename T> | 12 template <typename T> |
12 struct DefaultSingletonTraits; | 13 struct DefaultSingletonTraits; |
| 14 } // namespace base |
13 | 15 |
14 namespace enhanced_bookmarks { | 16 namespace enhanced_bookmarks { |
15 | 17 |
16 class BookmarkServerClusterService; | 18 class BookmarkServerClusterService; |
17 | 19 |
18 // A factory to create one unique BookmarkServerClusterService. | 20 // A factory to create one unique BookmarkServerClusterService. |
19 class BookmarkServerClusterServiceFactory | 21 class BookmarkServerClusterServiceFactory |
20 : public BrowserContextKeyedServiceFactory { | 22 : public BrowserContextKeyedServiceFactory { |
21 public: | 23 public: |
22 static BookmarkServerClusterServiceFactory* GetInstance(); | 24 static BookmarkServerClusterServiceFactory* GetInstance(); |
23 static BookmarkServerClusterService* GetForBrowserContext( | 25 static BookmarkServerClusterService* GetForBrowserContext( |
24 content::BrowserContext* context); | 26 content::BrowserContext* context); |
25 | 27 |
26 private: | 28 private: |
27 friend struct DefaultSingletonTraits<BookmarkServerClusterServiceFactory>; | 29 friend struct base::DefaultSingletonTraits< |
| 30 BookmarkServerClusterServiceFactory>; |
28 | 31 |
29 BookmarkServerClusterServiceFactory(); | 32 BookmarkServerClusterServiceFactory(); |
30 ~BookmarkServerClusterServiceFactory() override; | 33 ~BookmarkServerClusterServiceFactory() override; |
31 | 34 |
32 KeyedService* BuildServiceInstanceFor( | 35 KeyedService* BuildServiceInstanceFor( |
33 content::BrowserContext* context) const override; | 36 content::BrowserContext* context) const override; |
34 | 37 |
35 content::BrowserContext* GetBrowserContextToUse( | 38 content::BrowserContext* GetBrowserContextToUse( |
36 content::BrowserContext* context) const override; | 39 content::BrowserContext* context) const override; |
37 | 40 |
38 DISALLOW_COPY_AND_ASSIGN(BookmarkServerClusterServiceFactory); | 41 DISALLOW_COPY_AND_ASSIGN(BookmarkServerClusterServiceFactory); |
39 }; | 42 }; |
40 | 43 |
41 } // namespace enhanced_bookmarks | 44 } // namespace enhanced_bookmarks |
42 | 45 |
43 #endif // CHROME_BROWSER_ENHANCED_BOOKMARKS_BOOKMARK_SERVER_CLUSTER_SERVICE_FAC
TORY_H_ | 46 #endif // CHROME_BROWSER_ENHANCED_BOOKMARKS_BOOKMARK_SERVER_CLUSTER_SERVICE_FAC
TORY_H_ |
OLD | NEW |