| 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..57ebcd0b9bfc16912da63676b15e2e7d07d539f6 100644
|
| --- a/components/ntp_snippets/content_suggestions_provider.h
|
| +++ b/components/ntp_snippets/content_suggestions_provider.h
|
| @@ -30,6 +30,8 @@ class ContentSuggestionsProvider {
|
| public:
|
| using ImageFetchedCallback =
|
| base::Callback<void(const std::string& suggestion_id, const gfx::Image&)>;
|
| + using DismissedSuggestionsCallback = base::Callback<void(
|
| + std::vector<ContentSuggestion> dismissed_suggestions)>;
|
|
|
| // The observer of a provider is notified when new data is available.
|
| class Observer {
|
| @@ -115,9 +117,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
|
|
|