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

Unified Diff: components/ntp_snippets/content_suggestions_service.cc

Issue 2260783002: Make GetDismissedSuggestionsForDebugging asynchronous (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/content_suggestions_service.cc
diff --git a/components/ntp_snippets/content_suggestions_service.cc b/components/ntp_snippets/content_suggestions_service.cc
index f9631e3115176f6361e628bb40c364a1c6d28394..2216989140e8282a0a874925d01701554c5033a7 100644
--- a/components/ntp_snippets/content_suggestions_service.cc
+++ b/components/ntp_snippets/content_suggestions_service.cc
@@ -104,13 +104,12 @@ void ContentSuggestionsService::ClearCachedSuggestionsForDebugging(
iterator->second->ClearCachedSuggestionsForDebugging(category);
}
-std::vector<ContentSuggestion>
-ContentSuggestionsService::GetDismissedSuggestionsForDebugging(
- Category category) {
+void ContentSuggestionsService::GetDismissedSuggestionsForDebugging(
+ Category category,
+ const DismissedSuggestionsCallback& callback) {
auto iterator = providers_by_category_.find(category);
- if (iterator == providers_by_category_.end())
- return std::vector<ContentSuggestion>();
- return iterator->second->GetDismissedSuggestionsForDebugging(category);
+ if (iterator != providers_by_category_.end())
+ iterator->second->GetDismissedSuggestionsForDebugging(category, callback);
Marc Treib 2016/08/19 10:07:51 else return empty vector?
Philipp Keck 2016/08/19 12:11:53 Done.
}
void ContentSuggestionsService::ClearDismissedSuggestionsForDebugging(

Powered by Google App Engine
This is Rietveld 408576698