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

Unified Diff: components/ntp_snippets/offline_pages/offline_page_suggestions_provider.h

Issue 2260783002: Make GetDismissedSuggestionsForDebugging asynchronous (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace function pointer, use multiple if-continue 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 side-by-side diff with in-line comments
Download patch
Index: components/ntp_snippets/offline_pages/offline_page_suggestions_provider.h
diff --git a/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.h b/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.h
index 35b6161385dcc72c1aef887cb2d605d98c772c21..3b3820c219f38bb10484aa2f3a54737f4a85193d 100644
--- a/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.h
+++ b/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.h
@@ -55,8 +55,9 @@ class OfflinePageSuggestionsProvider
void FetchSuggestionImage(const std::string& suggestion_id,
const ImageFetchedCallback& callback) override;
void ClearCachedSuggestionsForDebugging(Category category) override;
- std::vector<ContentSuggestion> GetDismissedSuggestionsForDebugging(
- Category category) override;
+ void GetDismissedSuggestionsForDebugging(
+ Category category,
+ const DismissedSuggestionsCallback& callback) override;
void ClearDismissedSuggestionsForDebugging(Category category) override;
// OfflinePageModel::Observer implementation.
@@ -71,6 +72,10 @@ class OfflinePageSuggestionsProvider
// Callback from the OfflinePageModel.
void OnOfflinePagesLoaded(
const offline_pages::MultipleOfflinePageItemResult& result);
+ void OnOfflinePagesLoadedForDismissedDebugging(
+ Category category,
+ const DismissedSuggestionsCallback& callback,
+ const offline_pages::MultipleOfflinePageItemResult& result);
// Updates the |category_status_| of the |category| and notifies the
// |observer_|, if necessary.

Powered by Google App Engine
This is Rietveld 408576698