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 1c8a12acfa6e90752082ce69e8841384db8ef89b..2d96c0c2d3329b998c2a64ef36328933121db02b 100644 |
--- a/components/ntp_snippets/ntp_snippets_service.cc |
+++ b/components/ntp_snippets/ntp_snippets_service.cc |
@@ -265,8 +265,13 @@ void NTPSnippetsService::FetchSnippetsFromHosts( |
if (snippets_.empty()) |
UpdateCategoryStatus(CategoryStatus::AVAILABLE_LOADING); |
- snippets_fetcher_->FetchSnippetsFromHosts( |
- hosts, application_language_code_, kMaxSnippetCount, interactive_request); |
+ std::set<std::string> excluded_ids; |
+ for (const auto& snippet : dismissed_snippets_) { |
+ excluded_ids.insert(snippet->id()); |
tschumann
2016/08/24 16:56:19
i'm wondering if we should limit those, to say no
sfiera
2016/08/24 17:08:28
We have timestamps of creation and expiration, but
tschumann
2016/08/24 18:24:07
Good point! This of course assumes that we don't s
Marc Treib
2016/08/25 09:01:41
+1 for some hard limit, just to be safe. I'd put t
sfiera
2016/08/25 10:39:56
Done (there, 100).
|
+ } |
+ snippets_fetcher_->FetchSnippetsFromHosts(hosts, application_language_code_, |
+ excluded_ids, kMaxSnippetCount, |
+ interactive_request); |
} |
void NTPSnippetsService::RescheduleFetching() { |