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 736eb4933f9bc285284c17d78067728ba0b39da9..0bddf032dbc82255ff4db5cf11fa3e2a2f1f1796 100644 |
--- a/components/ntp_snippets/ntp_snippets_service.cc |
+++ b/components/ntp_snippets/ntp_snippets_service.cc |
@@ -247,19 +247,20 @@ void NTPSnippetsService::Shutdown() { |
EnterState(State::SHUT_DOWN, ContentSuggestionsCategoryStatus::NOT_PROVIDED); |
} |
-void NTPSnippetsService::FetchSnippets() { |
+void NTPSnippetsService::FetchSnippets(bool force_request) { |
if (ready()) |
- FetchSnippetsFromHosts(GetSuggestionsHosts()); |
+ FetchSnippetsFromHosts(GetSuggestionsHosts(), force_request); |
else |
fetch_after_load_ = true; |
} |
void NTPSnippetsService::FetchSnippetsFromHosts( |
- const std::set<std::string>& hosts) { |
+ const std::set<std::string>& hosts, |
+ bool force_request) { |
if (!ready()) |
return; |
snippets_fetcher_->FetchSnippetsFromHosts(hosts, application_language_code_, |
- kMaxSnippetCount); |
+ kMaxSnippetCount, force_request); |
} |
void NTPSnippetsService::RescheduleFetching() { |
@@ -439,7 +440,7 @@ void NTPSnippetsService::OnSuggestionsChanged( |
NotifyNewSuggestions(); |
- FetchSnippetsFromHosts(hosts); |
+ FetchSnippetsFromHosts(hosts, /*force_request=*/false); |
} |
void NTPSnippetsService::OnFetchFinished( |
@@ -652,7 +653,7 @@ void NTPSnippetsService::FetchSnippetImageFromNetwork( |
void NTPSnippetsService::EnterStateEnabled(bool fetch_snippets) { |
if (fetch_snippets) |
- FetchSnippets(); |
+ FetchSnippets(/*force_request=*/false); |
// If host restrictions are enabled, register for host list updates. |
// |suggestions_service_| can be null in tests. |