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

Unified Diff: components/ntp_snippets/remote/ntp_snippets_service.cc

Issue 2454063002: [NTP Snippets] Clean up NTPSnippetsFetcher (Closed)
Patch Set: . Created 4 years, 2 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/remote/ntp_snippets_service.cc
diff --git a/components/ntp_snippets/remote/ntp_snippets_service.cc b/components/ntp_snippets/remote/ntp_snippets_service.cc
index fe44999a59eb9e61895ebdaddadf6d2a9bff3853..6d7c5418da939ae436a566f9fd329852dea18c03 100644
--- a/components/ntp_snippets/remote/ntp_snippets_service.cc
+++ b/components/ntp_snippets/remote/ntp_snippets_service.cc
@@ -254,15 +254,17 @@ void NTPSnippetsService::FetchSnippetsFromHosts(
UpdateCategoryStatus(category, CategoryStatus::AVAILABLE_LOADING);
}
- std::set<std::string> excluded_ids;
+ NTPSnippetsFetcher::Params params;
+ params.language_code = application_language_code_;
+ params.count_to_fetch = kMaxSnippetCount;
+ params.hosts = hosts;
+ params.interactive_request = interactive_request;
for (const auto& item : categories_) {
const CategoryContent& content = item.second;
for (const auto& snippet : content.dismissed)
- excluded_ids.insert(snippet->id());
+ params.excluded_ids.insert(snippet->id());
}
- snippets_fetcher_->FetchSnippetsFromHosts(hosts, application_language_code_,
- excluded_ids, kMaxSnippetCount,
- interactive_request);
+ snippets_fetcher_->FetchSnippets(params);
}
void NTPSnippetsService::RescheduleFetching(bool force) {

Powered by Google App Engine
This is Rietveld 408576698