| Index: components/ntp_snippets/remote/remote_suggestions_provider.cc
|
| diff --git a/components/ntp_snippets/remote/remote_suggestions_provider.cc b/components/ntp_snippets/remote/remote_suggestions_provider.cc
|
| index a33d4d9a3144c9acbdda695d636799a4b0d8f193..8201c0f97c5b8b6ad6b7698c7176de9a919b3ad9 100644
|
| --- a/components/ntp_snippets/remote/remote_suggestions_provider.cc
|
| +++ b/components/ntp_snippets/remote/remote_suggestions_provider.cc
|
| @@ -308,30 +308,16 @@ void RemoteSuggestionsProvider::FetchSnippetsForAllCategories() {
|
| FetchSnippets(/*interactive_request=*/true);
|
| }
|
|
|
| -void RemoteSuggestionsProvider::FetchSnippets(bool interactive_request) {
|
| - // TODO(markusheintz): Merge the FetchSnippets into the
|
| - // FetchSnippetsInTheBackground method.
|
| - if (ready()) {
|
| - FetchSnippetsFromHosts(std::set<std::string>(), interactive_request);
|
| - } else {
|
| - fetch_when_ready_ = true;
|
| - }
|
| -}
|
| -
|
| -void RemoteSuggestionsProvider::FetchSnippetsFromHosts(
|
| - const std::set<std::string>& hosts,
|
| +void RemoteSuggestionsProvider::FetchSnippets(
|
| bool interactive_request) {
|
| - // TODO(tschumann): FetchSnippets() and FetchSnippetsFromHost() implement the
|
| - // fetch logic when called by the background fetcher or interactive "reload"
|
| - // requests. Fetch() is right now only called for the fetch-more use case.
|
| - // The names are confusing and we need to clean them up.
|
| if (!ready()) {
|
| + fetch_when_ready_ = true;
|
| return;
|
| }
|
| +
|
| MarkEmptyCategoriesAsLoading();
|
|
|
| NTPSnippetsFetcher::Params params = BuildFetchParams();
|
| - params.hosts = hosts;
|
| params.interactive_request = interactive_request;
|
| snippets_fetcher_->FetchSnippets(
|
| params, base::BindOnce(&RemoteSuggestionsProvider::OnFetchFinished,
|
|
|