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

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: Rebase, fix. 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
« no previous file with comments | « components/ntp_snippets/ntp_snippets_fetcher_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1edb4c8c6e46cd640bebefb9dc73563ea04587f9..99546b7f2e9ad352b9b6e6c091d5804633cb1c11 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() {
« no previous file with comments | « components/ntp_snippets/ntp_snippets_fetcher_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698