#include "chrome/browser/ui/profiles/profile_customization_util.h"
#include "base/auto_reset.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/task/single_thread_task_runner.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_manager.h"
#include "chrome/browser/profiles/profiles_state.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/signin/signin_util.h"
#include "chrome/common/pref_names.h"
#include "components/prefs/pref_service.h"
#include "components/signin/public/base/signin_switches.h"
#include "components/signin/public/identity_manager/account_info.h"
#include "components/signin/public/identity_manager/identity_manager.h"
namespace {
constexpr base::TimeDelta kDefaultExtendedAccountInfoTimeout = …;
std::optional<base::TimeDelta> g_extended_account_info_timeout_for_testing = …;
}
void FinalizeNewProfileSetup(Profile* profile,
const std::u16string& profile_name,
bool is_default_name) { … }
ProfileNameResolver::ScopedInfoFetchTimeoutOverride
ProfileNameResolver::CreateScopedInfoFetchTimeoutOverrideForTesting(
base::TimeDelta timeout) { … }
ProfileNameResolver::ProfileNameResolver(
signin::IdentityManager* identity_manager,
const CoreAccountInfo& core_account_info)
: … { … }
ProfileNameResolver::~ProfileNameResolver() = default;
void ProfileNameResolver::RunWithProfileName(NameResolvedCallback callback) { … }
void ProfileNameResolver::OnExtendedAccountInfoUpdated(
const AccountInfo& account_info) { … }
void ProfileNameResolver::OnProfileNameResolved(
const std::u16string& profile_name) { … }