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

Side by Side Diff: components/ntp_snippets/ntp_snippets_service.h

Issue 2207493002: Add CategoryInfo for meta information of content suggestions Categories (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DCHECK against empty base::Optional<CategoryInfo> in SnippetsInternals Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_NTP_SNIPPETS_SERVICE_H_ 5 #ifndef COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_
6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ 6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 return snippets_status_service_->disabled_reason(); 119 return snippets_status_service_->disabled_reason();
120 } 120 }
121 121
122 // (Re)schedules the periodic fetching of snippets. This is necessary because 122 // (Re)schedules the periodic fetching of snippets. This is necessary because
123 // the schedule depends on the time of day. 123 // the schedule depends on the time of day.
124 void RescheduleFetching(); 124 void RescheduleFetching();
125 125
126 // ContentSuggestionsProvider implementation 126 // ContentSuggestionsProvider implementation
127 std::vector<Category> GetProvidedCategories() override; 127 std::vector<Category> GetProvidedCategories() override;
128 CategoryStatus GetCategoryStatus(Category category) override; 128 CategoryStatus GetCategoryStatus(Category category) override;
129 CategoryInfo GetCategoryInfo(Category category) override;
129 void DismissSuggestion(const std::string& suggestion_id) override; 130 void DismissSuggestion(const std::string& suggestion_id) override;
130 void FetchSuggestionImage(const std::string& suggestion_id, 131 void FetchSuggestionImage(const std::string& suggestion_id,
131 const ImageFetchedCallback& callback) override; 132 const ImageFetchedCallback& callback) override;
132 void ClearCachedSuggestionsForDebugging(Category category) override; 133 void ClearCachedSuggestionsForDebugging(Category category) override;
133 std::vector<ContentSuggestion> GetDismissedSuggestionsForDebugging( 134 std::vector<ContentSuggestion> GetDismissedSuggestionsForDebugging(
134 Category category) override; 135 Category category) override;
135 void ClearDismissedSuggestionsForDebugging(Category category) override; 136 void ClearDismissedSuggestionsForDebugging(Category category) override;
136 137
137 // Returns the lists of suggestion hosts the snippets are restricted to. 138 // Returns the lists of suggestion hosts the snippets are restricted to.
138 std::set<std::string> GetSuggestionsHosts() const; 139 std::set<std::string> GetSuggestionsHosts() const;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 bool fetch_after_load_; 303 bool fetch_after_load_;
303 304
304 const Category provided_category_; 305 const Category provided_category_;
305 306
306 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService); 307 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService);
307 }; 308 };
308 309
309 } // namespace ntp_snippets 310 } // namespace ntp_snippets
310 311
311 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ 312 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_
OLDNEW
« 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