Chromium Code Reviews| Index: components/ntp_snippets/content_suggestions_provider.h |
| diff --git a/components/ntp_snippets/content_suggestions_provider.h b/components/ntp_snippets/content_suggestions_provider.h |
| index f6741356d66e6cfc0a3773c83c8afe25a6d63d83..7e5742e94fc6d4796c9f9b7c9249ff1c5f0918fb 100644 |
| --- a/components/ntp_snippets/content_suggestions_provider.h |
| +++ b/components/ntp_snippets/content_suggestions_provider.h |
| @@ -31,6 +31,8 @@ class ContentSuggestionsProvider { |
| using ImageFetchedCallback = base::Callback<void(const gfx::Image&)>; |
| using DismissedSuggestionsCallback = base::Callback<void( |
| std::vector<ContentSuggestion> dismissed_suggestions)>; |
| + using FetchedMoreCallback = |
| + base::Callback<void(std::vector<ContentSuggestion> suggestions)>; |
| // The observer of a provider is notified when new data is available. |
| class Observer { |
| @@ -100,6 +102,12 @@ class ContentSuggestionsProvider { |
| virtual void FetchSuggestionImage(const ContentSuggestion::ID& suggestion_id, |
| const ImageFetchedCallback& callback) = 0; |
| + // A user-triggered request to fetch more content for the given category. |
| + // Provides only suggestions that have not been provided. The given |callback| |
|
Marc Treib
2016/10/20 16:51:39
What if I call this method twice in a row - will I
Marc Treib
2016/10/28 14:49:49
Also discussed with dgn and bauerb: Yep, we'll pas
fhorschig
2016/11/02 05:05:26
Done in CL 2466863003.
|
| + // is called with these suggestion, along with all existing suggestions. |
| + virtual void FetchMore(const Category& category, |
| + FetchedMoreCallback callback) = 0; |
|
Marc Treib
2016/10/20 16:51:39
This should be a const&.
(Or alternatively, it cou
fhorschig
2016/11/02 05:05:27
Done. It's const for now.
|
| + |
| // Removes history from the specified time range where the URL matches the |
| // |filter|. The data removed depends on the provider. Note that the |
| // data outside the time range may be deleted, for example suggestions, which |