Chromium Code Reviews| Index: components/ntp_snippets/content_suggestions_service.h |
| diff --git a/components/ntp_snippets/content_suggestions_service.h b/components/ntp_snippets/content_suggestions_service.h |
| index f8a96a69e416f5bef9d5bc343fa20e156febe01b..785860b04981735094119226d0d0c9a7042e5e0f 100644 |
| --- a/components/ntp_snippets/content_suggestions_service.h |
| +++ b/components/ntp_snippets/content_suggestions_service.h |
| @@ -20,9 +20,10 @@ |
| #include "components/history/core/browser/history_service_observer.h" |
| #include "components/keyed_service/core/keyed_service.h" |
| #include "components/ntp_snippets/callbacks.h" |
| -#include "components/ntp_snippets/category_factory.h" |
| +#include "components/ntp_snippets/category.h" |
| #include "components/ntp_snippets/category_status.h" |
| #include "components/ntp_snippets/content_suggestions_provider.h" |
| +#include "components/ntp_snippets/section_rankers/section_ranker.h" |
| #include "components/ntp_snippets/user_classifier.h" |
| #include "components/signin/core/browser/signin_manager.h" |
| @@ -88,7 +89,8 @@ class ContentSuggestionsService : public KeyedService, |
| ContentSuggestionsService(State state, |
| SigninManagerBase* signin_manager, |
| history::HistoryService* history_service, |
| - PrefService* pref_service); |
| + PrefService* pref_service, |
| + std::unique_ptr<SectionRanker> section_ranker); |
| ~ContentSuggestionsService() override; |
| // Inherited from KeyedService. |
| @@ -191,8 +193,6 @@ class ContentSuggestionsService : public KeyedService, |
| // supports it). |
| void ClearDismissedSuggestionsForDebugging(Category category); |
| - CategoryFactory* category_factory() { return &category_factory_; } |
| - |
| // The reference to the RemoteSuggestionsProvider provider should only be set |
| // by the factory and only be used for scheduling, periodic fetching and |
| // debugging. |
| @@ -205,6 +205,7 @@ class ContentSuggestionsService : public KeyedService, |
| } |
| UserClassifier* user_classifier() { return &user_classifier_; } |
| + SectionRanker* section_ranker() { return section_ranker_.get(); } |
| private: |
| friend class ContentSuggestionsServiceTest; |
| @@ -266,9 +267,6 @@ class ContentSuggestionsService : public KeyedService, |
| // Whether the content suggestions feature is enabled. |
| State state_; |
| - // Provides new and existing categories and an order for them. |
| - CategoryFactory category_factory_; |
| - |
| // All registered providers, owned by the service. |
| std::vector<std::unique_ptr<ContentSuggestionsProvider>> providers_; |
| @@ -322,6 +320,9 @@ class ContentSuggestionsService : public KeyedService, |
| UserClassifier user_classifier_; |
| + // Probider order for categories. |
|
Marc Treib
2016/12/13 12:22:42
s/Probider/Provides/ ?
vitaliii
2016/12/14 08:59:38
Done.
|
| + std::unique_ptr<SectionRanker> section_ranker_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsService); |
| }; |