#include "chrome/browser/profiles/gaia_info_update_service.h"
#include <stddef.h>
#include "base/containers/contains.h"
#include "base/containers/flat_set.h"
#include "base/containers/to_vector.h"
#include "base/metrics/histogram_functions.h"
#include "base/strings/strcat.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile_attributes_entry.h"
#include "chrome/browser/profiles/profile_attributes_storage.h"
#include "chrome/browser/profiles/profile_metrics.h"
#include "chrome/browser/profiles/profiles_state.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/common/pref_names.h"
#include "components/prefs/pref_service.h"
#include "components/signin/public/base/avatar_icon_util.h"
#include "components/signin/public/base/consent_level.h"
#include "components/signin/public/base/signin_pref_names.h"
#include "components/signin/public/base/signin_prefs.h"
#include "components/signin/public/identity_manager/account_info.h"
#include "components/signin/public/identity_manager/accounts_in_cookie_jar_info.h"
#include "components/signin/public/identity_manager/identity_manager.h"
#include "components/signin/public/identity_manager/identity_utils.h"
#include "content/public/browser/storage_partition.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/image/image.h"
namespace {
void UpdateAccountsPrefs(
PrefService& pref_service,
const signin::IdentityManager& identity_manager,
const signin::AccountsInCookieJarInfo& accounts_in_cookie_jar_info) { … }
}
GAIAInfoUpdateService::GAIAInfoUpdateService(
signin::IdentityManager* identity_manager,
ProfileAttributesStorage* profile_attributes_storage,
PrefService& pref_service,
const base::FilePath& profile_path)
: … { … }
GAIAInfoUpdateService::~GAIAInfoUpdateService() = default;
void GAIAInfoUpdateService::UpdatePrimaryAccount() { … }
void GAIAInfoUpdateService::UpdatePrimaryAccount(const AccountInfo& info) { … }
void GAIAInfoUpdateService::UpdateAnyAccount(const AccountInfo& info) { … }
void GAIAInfoUpdateService::ClearProfileEntry() { … }
void GAIAInfoUpdateService::Shutdown() { … }
void GAIAInfoUpdateService::OnPrimaryAccountChanged(
const signin::PrimaryAccountChangeEvent& event) { … }
void GAIAInfoUpdateService::OnExtendedAccountInfoUpdated(
const AccountInfo& info) { … }
void GAIAInfoUpdateService::OnAccountsInCookieUpdated(
const signin::AccountsInCookieJarInfo& accounts_in_cookie_jar_info,
const GoogleServiceAuthError& error) { … }
bool GAIAInfoUpdateService::ShouldUpdatePrimaryAccount() { … }