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

Unified Diff: components/ntp_snippets/ntp_snippets_service.h

Issue 2187233002: Add ContentSuggestionsCategoryFactory; Store categories as ints (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
Index: components/ntp_snippets/ntp_snippets_service.h
diff --git a/components/ntp_snippets/ntp_snippets_service.h b/components/ntp_snippets/ntp_snippets_service.h
index 808e1910fd47532845e4b0112f1b843ca2613928..ecd6b1e7da67b1ebb5304ecfa44429d8f40f7d14 100644
--- a/components/ntp_snippets/ntp_snippets_service.h
+++ b/components/ntp_snippets/ntp_snippets_service.h
@@ -21,6 +21,7 @@
#include "components/keyed_service/core/keyed_service.h"
#include "components/ntp_snippets/content_suggestion.h"
#include "components/ntp_snippets/content_suggestions_category.h"
+#include "components/ntp_snippets/content_suggestions_category_factory.h"
#include "components/ntp_snippets/content_suggestions_category_status.h"
#include "components/ntp_snippets/content_suggestions_provider.h"
#include "components/ntp_snippets/ntp_snippet.h"
@@ -76,6 +77,7 @@ class NTPSnippetsService : public KeyedService,
NTPSnippetsService(bool enabled,
PrefService* pref_service,
suggestions::SuggestionsService* suggestions_service,
+ ContentSuggestionsCategoryFactory* category_factory,
const std::string& application_language_code,
NTPSnippetsScheduler* scheduler,
std::unique_ptr<NTPSnippetsFetcher> snippets_fetcher,
@@ -139,6 +141,7 @@ class NTPSnippetsService : public KeyedService,
// ContentSuggestionsProvider implementation
// TODO(pke): At some point reorder the implementations in the .cc file
// accordingly.
+ std::vector<ContentSuggestionsCategory> GetProvidedCategories() override;
void SetObserver(Observer* observer) override;
ContentSuggestionsCategoryStatus GetCategoryStatus(
ContentSuggestionsCategory category) override;
@@ -323,6 +326,8 @@ class NTPSnippetsService : public KeyedService,
// The fetch will be executed after the database load finishes.
bool fetch_after_load_;
+ const ContentSuggestionsCategory provided_category_;
+
DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService);
};
« no previous file with comments | « components/ntp_snippets/content_suggestions_service_unittest.cc ('k') | components/ntp_snippets/ntp_snippets_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698