#include "components/account_id/account_id.h"
#include <functional>
#include <memory>
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/logging.h"
#include "base/no_destructor.h"
#include "base/notreached.h"
#include "base/strings/string_util.h"
#include "base/values.h"
#include "google_apis/gaia/gaia_auth_util.h"
namespace {
const char kGaiaIdKey[] = …;
const char kEmailKey[] = …;
const char kObjGuid[] = …;
const char kAccountTypeKey[] = …;
const char kGoogle[] = …;
const char kAd[] = …;
const char kUnknown[] = …;
const char kKeyGaiaIdPrefix[] = …;
const char kKeyAdIdPrefix[] = …;
}
AccountId::AccountId() = default;
AccountId::AccountId(const std::string& id,
const std::string& user_email,
const AccountType& account_type)
: … { … }
AccountId::AccountId(const AccountId& other) = default;
AccountId& AccountId::operator=(const AccountId& other) = default;
bool AccountId::operator==(const AccountId& other) const { … }
bool AccountId::operator!=(const AccountId& other) const { … }
bool AccountId::operator<(const AccountId& right) const { … }
bool AccountId::empty() const { … }
bool AccountId::is_valid() const { … }
void AccountId::clear() { … }
AccountType AccountId::GetAccountType() const { … }
const std::string& AccountId::GetGaiaId() const { … }
const std::string& AccountId::GetObjGuid() const { … }
const std::string& AccountId::GetUserEmail() const { … }
bool AccountId::HasAccountIdKey() const { … }
const std::string AccountId::GetAccountIdKey() const { … }
void AccountId::SetUserEmail(const std::string& email) { … }
AccountId AccountId::FromNonCanonicalEmail(const std::string& email,
const std::string& gaia_id,
const AccountType& account_type) { … }
AccountId AccountId::FromUserEmail(const std::string& email) { … }
AccountId AccountId::FromUserEmailGaiaId(const std::string& email,
const std::string& gaia_id) { … }
AccountId AccountId::AdFromUserEmailObjGuid(const std::string& email,
const std::string& obj_guid) { … }
AccountType AccountId::StringToAccountType(
const std::string& account_type_string) { … }
std::string AccountId::AccountTypeToString(const AccountType& account_type) { … }
std::string AccountId::Serialize() const { … }
bool AccountId::Deserialize(const std::string& serialized,
AccountId* account_id) { … }
std::ostream& operator<<(std::ostream& stream, const AccountId& account_id) { … }
const AccountId& EmptyAccountId() { … }
namespace std {
std::size_t hash<AccountId>::operator()(const AccountId& user_id) const { … }
}