#include "chrome/browser/ui/views/autofill/popup/password_favicon_loader.h"
#include "base/functional/bind.h"
#include "chrome/browser/favicon/large_icon_service_factory.h"
#include "chrome/browser/sync/sync_service_factory.h"
#include "components/autofill/core/browser/payments_suggestion_generator.h"
#include "components/favicon/core/large_icon_service.h"
#include "components/favicon_base/favicon_types.h"
#include "components/image_fetcher/core/image_fetcher.h"
#include "components/image_fetcher/core/image_fetcher_types.h"
#include "components/image_fetcher/core/request_metadata.h"
#include "components/password_manager/core/browser/password_sync_util.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "ui/gfx/image/image.h"
#include "url/gurl.h"
namespace autofill {
namespace {
constexpr int kFaviconCacheSize = …;
constexpr std::string_view kFaviconFilename = …;
constexpr char kImageFetcherClientName[] = …;
constexpr net::NetworkTrafficAnnotationTag kFaviconTrafficAnnotation = …;
}
PasswordFaviconLoaderImpl::PasswordFaviconLoaderImpl(
favicon::LargeIconService* favicon_service,
image_fetcher::ImageFetcher* image_fetcher)
: … { … }
PasswordFaviconLoaderImpl::~PasswordFaviconLoaderImpl() = default;
void PasswordFaviconLoaderImpl::Load(
const Suggestion::FaviconDetails& favicon_details,
base::CancelableTaskTracker* task_tracker,
OnLoadSuccess on_success,
OnLoadFail on_fail) { … }
void PasswordFaviconLoaderImpl::OnFaviconResponse(
const GURL& domain_url,
OnLoadSuccess on_success,
OnLoadFail on_fail,
const favicon_base::LargeIconResult& result) { … }
void PasswordFaviconLoaderImpl::OnFaviconResponseFromImageFetcher(
const GURL& domain_url,
OnLoadSuccess on_success,
OnLoadFail on_fail,
const gfx::Image& image,
const image_fetcher::RequestMetadata& request_metadata) { … }
}