OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_ANDROID_NTP_OFFLINE_PAGE_SUGGESTIONS_PROVIDER_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_NTP_BOOKMARK_SUGGESTIONS_PROVIDER_FACTORY_H_ |
6 #define CHROME_BROWSER_ANDROID_NTP_OFFLINE_PAGE_SUGGESTIONS_PROVIDER_FACTORY_H_ | 6 #define CHROME_BROWSER_ANDROID_NTP_BOOKMARK_SUGGESTIONS_PROVIDER_FACTORY_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 11 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
12 | 12 |
13 class Profile; | 13 class Profile; |
14 | 14 |
15 namespace base { | 15 namespace base { |
16 template <typename T> | 16 template <typename T> |
17 struct DefaultSingletonTraits; | 17 struct DefaultSingletonTraits; |
18 } // namespace base | 18 } // namespace base |
19 | 19 |
20 namespace ntp_snippets { | 20 namespace ntp_snippets { |
21 class ContentSuggestionsService; | 21 class BookmarkSuggestionsProvider; |
22 class OfflinePageSuggestionsProvider; | |
23 } // namespace ntp_snippets | 22 } // namespace ntp_snippets |
24 | 23 |
25 class OfflinePageSuggestionsProviderFactory | 24 class BookmarkSuggestionsProviderFactory |
26 : public BrowserContextKeyedServiceFactory { | 25 : public BrowserContextKeyedServiceFactory { |
27 public: | 26 public: |
28 static OfflinePageSuggestionsProviderFactory* GetInstance(); | 27 static BookmarkSuggestionsProviderFactory* GetInstance(); |
29 static ntp_snippets::OfflinePageSuggestionsProvider* GetForProfile( | 28 static ntp_snippets::BookmarkSuggestionsProvider* GetForProfile( |
30 Profile* profile); | 29 Profile* profile); |
31 | 30 |
32 private: | 31 private: |
33 friend struct base::DefaultSingletonTraits< | 32 friend struct base::DefaultSingletonTraits< |
34 OfflinePageSuggestionsProviderFactory>; | 33 BookmarkSuggestionsProviderFactory>; |
35 | 34 |
36 OfflinePageSuggestionsProviderFactory(); | 35 BookmarkSuggestionsProviderFactory(); |
37 ~OfflinePageSuggestionsProviderFactory() override; | 36 ~BookmarkSuggestionsProviderFactory() override; |
38 | 37 |
39 // BrowserContextKeyedServiceFactory implementation. | 38 // BrowserContextKeyedServiceFactory implementation. |
40 KeyedService* BuildServiceInstanceFor( | 39 KeyedService* BuildServiceInstanceFor( |
41 content::BrowserContext* context) const override; | 40 content::BrowserContext* context) const override; |
42 | 41 |
43 DISALLOW_COPY_AND_ASSIGN(OfflinePageSuggestionsProviderFactory); | 42 DISALLOW_COPY_AND_ASSIGN(BookmarkSuggestionsProviderFactory); |
44 }; | 43 }; |
45 | 44 |
46 #endif // CHROME_BROWSER_ANDROID_NTP_OFFLINE_PAGE_SUGGESTIONS_PROVIDER_FACTORY_
H_ | 45 #endif // CHROME_BROWSER_ANDROID_NTP_BOOKMARK_SUGGESTIONS_PROVIDER_FACTORY_H_ |
OLD | NEW |