Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: chrome/browser/ntp_snippets/offline_page_suggestions_provider_factory.h

Issue 2139293004: [TEMP - DO NOT SUBMIT] OfflinePagesProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@internalspage
Patch Set: Implement OfflinePage conversion Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_FACTORY_H_ 5 #ifndef CHROME_BROWSER_NTP_SNIPPETS_OFFLINE_PAGE_SUGGESTIONS_PROVIDER_FACTORY_H_
6 #define CHROME_BROWSER_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_FACTORY_H_ 6 #define CHROME_BROWSER_NTP_SNIPPETS_OFFLINE_PAGE_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 ContentSuggestionsService;
22 class OfflinePageSuggestionsProvider;
22 } // namespace ntp_snippets 23 } // namespace ntp_snippets
23 24
24 class ContentSuggestionsServiceFactory 25 class OfflinePageSuggestionsProviderFactory
25 : public BrowserContextKeyedServiceFactory { 26 : public BrowserContextKeyedServiceFactory {
26 public: 27 public:
27 static ContentSuggestionsServiceFactory* GetInstance(); 28 static OfflinePageSuggestionsProviderFactory* GetInstance();
28 static ntp_snippets::ContentSuggestionsService* GetForProfile( 29 static ntp_snippets::OfflinePageSuggestionsProvider* GetForProfile(
29 Profile* profile); 30 Profile* profile);
30 31
31 private: 32 private:
32 friend struct base::DefaultSingletonTraits<ContentSuggestionsServiceFactory>; 33 friend struct base::DefaultSingletonTraits<
34 OfflinePageSuggestionsProviderFactory>;
33 35
34 ContentSuggestionsServiceFactory(); 36 OfflinePageSuggestionsProviderFactory();
35 ~ContentSuggestionsServiceFactory() override; 37 ~OfflinePageSuggestionsProviderFactory() override;
36 38
37 // BrowserStateKeyedServiceFactory implementation. 39 // BrowserStateKeyedServiceFactory implementation.
38 KeyedService* BuildServiceInstanceFor( 40 KeyedService* BuildServiceInstanceFor(
39 content::BrowserContext* context) const override; 41 content::BrowserContext* context) const override;
40 42
41 DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsServiceFactory); 43 DISALLOW_COPY_AND_ASSIGN(OfflinePageSuggestionsProviderFactory);
42 }; 44 };
43 45
44 #endif // CHROME_BROWSER_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_FACTORY_H_ 46 #endif // CHROME_BROWSER_NTP_SNIPPETS_OFFLINE_PAGE_SUGGESTIONS_PROVIDER_FACTORY _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698