OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_FACTORY_H_ |
| 6 #define CHROME_BROWSER_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_FACTORY_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "components/enhanced_bookmarks/enhanced_bookmark_model.h" |
| 10 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
| 11 |
| 12 template <typename T> |
| 13 struct DefaultSingletonTraits; |
| 14 |
| 15 namespace enhanced_bookmarks { |
| 16 |
| 17 class EnhancedBookmarkModelFactory : public BrowserContextKeyedServiceFactory { |
| 18 public: |
| 19 static EnhancedBookmarkModelFactory* GetInstance(); |
| 20 static EnhancedBookmarkModel* GetForBrowserContext( |
| 21 content::BrowserContext* context); |
| 22 |
| 23 private: |
| 24 friend struct DefaultSingletonTraits<EnhancedBookmarkModelFactory>; |
| 25 |
| 26 EnhancedBookmarkModelFactory(); |
| 27 virtual ~EnhancedBookmarkModelFactory(){} |
| 28 |
| 29 virtual EnhancedBookmarkModel* BuildServiceInstanceFor( |
| 30 content::BrowserContext* context) const OVERRIDE; |
| 31 |
| 32 virtual content::BrowserContext* GetBrowserContextToUse( |
| 33 content::BrowserContext* context) const OVERRIDE; |
| 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(EnhancedBookmarkModelFactory); |
| 36 }; |
| 37 |
| 38 } // namespace enhanced_bookmarks |
| 39 |
| 40 #endif // CHROME_BROWSER_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_FACTORY_H_ |
OLD | NEW |