#include "chrome/browser/profiles/profile_downloader.h"
#include <stddef.h>
#include <string>
#include <vector>
#include "base/functional/bind.h"
#include "base/json/json_reader.h"
#include "base/logging.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "build/build_config.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_downloader_delegate.h"
#include "components/signin/public/base/avatar_icon_util.h"
#include "components/signin/public/base/consent_level.h"
#include "components/signin/public/identity_manager/access_token_fetcher.h"
#include "components/signin/public/identity_manager/access_token_info.h"
#include "components/signin/public/identity_manager/account_info.h"
#include "components/signin/public/identity_manager/scope_set.h"
#include "google_apis/gaia/gaia_constants.h"
#include "net/base/load_flags.h"
#include "net/http/http_status_code.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "skia/ext/image_operations.h"
#include "url/gurl.h"
namespace {
constexpr char kAuthorizationHeader[] = …;
}
ProfileDownloader::ProfileDownloader(ProfileDownloaderDelegate* delegate)
: … { … }
void ProfileDownloader::Start() { … }
void ProfileDownloader::StartForAccount(const CoreAccountId& account_id) { … }
std::u16string ProfileDownloader::GetProfileFullName() const { … }
std::u16string ProfileDownloader::GetProfileGivenName() const { … }
std::string ProfileDownloader::GetProfileLocale() const { … }
SkBitmap ProfileDownloader::GetProfilePicture() const { … }
ProfileDownloader::PictureStatus ProfileDownloader::GetProfilePictureStatus()
const { … }
std::string ProfileDownloader::GetProfilePictureURL() const { … }
void ProfileDownloader::StartFetchingImage() { … }
void ProfileDownloader::StartFetchingOAuth2AccessToken() { … }
ProfileDownloader::~ProfileDownloader() { … }
void ProfileDownloader::FetchImageData() { … }
void ProfileDownloader::OnURLLoaderComplete(
std::unique_ptr<std::string> response_body) { … }
void ProfileDownloader::OnImageDecoded(const SkBitmap& decoded_image) { … }
void ProfileDownloader::OnDecodeImageFailed() { … }
void ProfileDownloader::OnAccessTokenFetchComplete(
GoogleServiceAuthError error,
signin::AccessTokenInfo access_token_info) { … }
void ProfileDownloader::OnExtendedAccountInfoUpdated(const AccountInfo& info) { … }