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

Unified Diff: components/ntp_snippets/ntp_snippets_service.cc

Issue 2274953002: Inform server of dismissed articles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: JSON comma. 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/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());
+ }
+ snippets_fetcher_->FetchSnippetsFromHosts(hosts, application_language_code_,
+ excluded_ids, kMaxSnippetCount,
+ interactive_request);
}
void NTPSnippetsService::RescheduleFetching() {

Powered by Google App Engine
This is Rietveld 408576698