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

Side by Side Diff: components/ntp_snippets/sessions/foreign_sessions_suggestions_provider.h

Issue 2568033005: [NTP::SectionOrder] Replace CategoryFactory with a category ranker. (Closed)
Patch Set: rebase. Created 4 years 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 COMPONENTS_NTP_SNIPPETS_SESSIONS_FOREIGN_SESSIONS_SUGGESTIONS_PROVIDER_H _ 5 #ifndef COMPONENTS_NTP_SNIPPETS_SESSIONS_FOREIGN_SESSIONS_SUGGESTIONS_PROVIDER_H _
6 #define COMPONENTS_NTP_SNIPPETS_SESSIONS_FOREIGN_SESSIONS_SUGGESTIONS_PROVIDER_H _ 6 #define COMPONENTS_NTP_SNIPPETS_SESSIONS_FOREIGN_SESSIONS_SUGGESTIONS_PROVIDER_H _
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 22 matching lines...) Expand all
33 // Should only be called at most once. 33 // Should only be called at most once.
34 virtual void SubscribeForForeignTabChange( 34 virtual void SubscribeForForeignTabChange(
35 const base::Closure& change_callback) = 0; 35 const base::Closure& change_callback) = 0;
36 }; 36 };
37 37
38 // Provides content suggestions from foreign sessions. 38 // Provides content suggestions from foreign sessions.
39 class ForeignSessionsSuggestionsProvider : public ContentSuggestionsProvider { 39 class ForeignSessionsSuggestionsProvider : public ContentSuggestionsProvider {
40 public: 40 public:
41 ForeignSessionsSuggestionsProvider( 41 ForeignSessionsSuggestionsProvider(
42 ContentSuggestionsProvider::Observer* observer, 42 ContentSuggestionsProvider::Observer* observer,
43 CategoryFactory* category_factory,
44 std::unique_ptr<ForeignSessionsProvider> foreign_sessions_provider, 43 std::unique_ptr<ForeignSessionsProvider> foreign_sessions_provider,
45 PrefService* pref_service); 44 PrefService* pref_service);
46 ~ForeignSessionsSuggestionsProvider() override; 45 ~ForeignSessionsSuggestionsProvider() override;
47 46
48 static void RegisterProfilePrefs(PrefRegistrySimple* registry); 47 static void RegisterProfilePrefs(PrefRegistrySimple* registry);
49 48
50 private: 49 private:
51 friend class ForeignSessionsSuggestionsProviderTest; 50 friend class ForeignSessionsSuggestionsProviderTest;
52 struct SessionData; 51 struct SessionData;
53 52
(...skipping 26 matching lines...) Expand all
80 const Category provided_category_; 79 const Category provided_category_;
81 std::unique_ptr<ForeignSessionsProvider> foreign_sessions_provider_; 80 std::unique_ptr<ForeignSessionsProvider> foreign_sessions_provider_;
82 PrefService* pref_service_; 81 PrefService* pref_service_;
83 82
84 DISALLOW_COPY_AND_ASSIGN(ForeignSessionsSuggestionsProvider); 83 DISALLOW_COPY_AND_ASSIGN(ForeignSessionsSuggestionsProvider);
85 }; 84 };
86 85
87 } // namespace ntp_snippets 86 } // namespace ntp_snippets
88 87
89 #endif // COMPONENTS_NTP_SNIPPETS_SESSIONS_FOREIGN_SESSIONS_SUGGESTIONS_PROVIDE R_H_ 88 #endif // COMPONENTS_NTP_SNIPPETS_SESSIONS_FOREIGN_SESSIONS_SUGGESTIONS_PROVIDE R_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698