Chromium Code Reviews| Index: components/ntp_snippets/ntp_snippets_service.cc |
| diff --git a/components/ntp_snippets/ntp_snippets_service.cc b/components/ntp_snippets/ntp_snippets_service.cc |
| index af70250a0c84904732e9ed7e23ba02f38c20bb37..7a9f83e21cbeff25a4191e2ae46b5167c648d6fe 100644 |
| --- a/components/ntp_snippets/ntp_snippets_service.cc |
| +++ b/components/ntp_snippets/ntp_snippets_service.cc |
| @@ -337,8 +337,9 @@ void NTPSnippetsService::ClearCachedSuggestionsForDebugging(Category category) { |
| NotifyNewSuggestions(); |
| } |
| -std::vector<ContentSuggestion> |
| -NTPSnippetsService::GetDismissedSuggestionsForDebugging(Category category) { |
| +void NTPSnippetsService::GetDismissedSuggestionsForDebugging( |
| + Category category, |
| + const DismissedSuggestionsCallback& callback) { |
| DCHECK_EQ(category, provided_category_); |
| std::vector<ContentSuggestion> result; |
| for (const std::unique_ptr<NTPSnippet>& snippet : dismissed_snippets_) { |
| @@ -356,7 +357,7 @@ NTPSnippetsService::GetDismissedSuggestionsForDebugging(Category category) { |
| suggestion.set_score(snippet->score()); |
| result.emplace_back(std::move(suggestion)); |
| } |
| - return result; |
| + return callback.Run(category, std::move(result)); |
|
Marc Treib
2016/08/19 10:07:51
No "return" - does this compile?!
Philipp Keck
2016/08/19 12:11:54
Done. No idea why the compiler accepts this.
|
| } |
| void NTPSnippetsService::ClearDismissedSuggestionsForDebugging( |