#include "components/feed/core/v2/public/ntp_feed_content_fetcher.h"
#include <memory>
#include "components/feed/core/proto/v2/wire/client_info.pb.h"
#include "components/feed/core/proto/v2/wire/stream_structure.pb.h"
#include "components/feed/core/v2/feed_network_impl.h"
#include "components/feed/core/v2/proto_util.h"
#include "components/feed/feed_feature_list.h"
#include "components/signin/public/identity_manager/identity_manager.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/public/cpp/simple_url_loader.h"
namespace feed {
namespace {
constexpr int kTargetArticleCount = …;
void HandleWebFeedListContentsResponse(
base::OnceCallback<void(std::vector<NtpFeedContentFetcher::Article>)>
callback,
FeedNetwork::ApiResult<feedwire::Response> response) { … }
}
NtpFeedContentFetcher::NtpFeedContentFetcher(
signin::IdentityManager* identity_manager,
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
const std::string& api_key,
PrefService* pref_service)
: … { … }
NtpFeedContentFetcher::~NtpFeedContentFetcher() = default;
NtpFeedContentFetcher::Article::Article() = default;
NtpFeedContentFetcher::Article::Article(const Article&) = default;
NtpFeedContentFetcher::Article::~Article() = default;
void NtpFeedContentFetcher::FetchFollowingFeedArticles(
base::OnceCallback<void(std::vector<NtpFeedContentFetcher::Article>)>
callback) { … }
void NtpFeedContentFetcher::SetFeedNetworkForTesting(
std::unique_ptr<FeedNetwork> feed_network) { … }
NtpFeedContentFetcher::NetworkDelegate::NetworkDelegate(
signin::IdentityManager* identity_manager)
: … { … }
std::string NtpFeedContentFetcher::NetworkDelegate::GetLanguageTag() { … }
AccountInfo NtpFeedContentFetcher::NetworkDelegate::GetAccountInfo() { … }
bool NtpFeedContentFetcher::NetworkDelegate::IsOffline() { … }
}