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