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 836fd41996ddd1d2589959e73426e70f72194709..0c9559fe5c3f7fec1aa4bfe30df89b5c48d4e40b 100644 |
| --- a/components/ntp_snippets/content_suggestions_provider.h |
| +++ b/components/ntp_snippets/content_suggestions_provider.h |
| @@ -30,6 +30,9 @@ class ContentSuggestionsProvider { |
| public: |
| using ImageFetchedCallback = |
| base::Callback<void(const std::string& suggestion_id, const gfx::Image&)>; |
| + using DismissedSuggestionsCallback = base::Callback<void( |
| + Category category, |
|
Marc Treib
2016/08/19 10:07:51
The category param isn't really required in the ca
Philipp Keck
2016/08/19 12:11:53
That's right. Why does ImageFetchedCallback have t
Marc Treib
2016/08/19 12:36:14
I don't know if there's a good reason for it in th
Philipp Keck
2016/08/19 14:20:40
Done.
|
| + std::vector<ContentSuggestion> dismissed_suggestions)>; |
| // The observer of a provider is notified when new data is available. |
| class Observer { |
| @@ -115,9 +118,11 @@ class ContentSuggestionsProvider { |
| // Used only for debugging purposes. Retrieves suggestions for the given |
| // |category| that have previously been dismissed and are still stored in the |
| // provider. If the provider doesn't store dismissed suggestions for the given |
| - // |category|, it always returns an empty vector. |
| - virtual std::vector<ContentSuggestion> GetDismissedSuggestionsForDebugging( |
| - Category category) = 0; |
| + // |category|, it always calls the callback with an empty vector. The callback |
| + // may be called synchronously. |
| + virtual void GetDismissedSuggestionsForDebugging( |
| + Category category, |
| + const DismissedSuggestionsCallback& callback) = 0; |
| // Used only for debugging purposes. Clears the cache of dismissed |
| // suggestions for the given |category|, if present, so that no suggestions |