#include "components/autofill/core/browser/data_model/phone_number.h"
#include <limits.h>
#include <algorithm>
#include "base/check_op.h"
#include "base/feature_list.h"
#include "base/notreached.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/browser/autofill_type.h"
#include "components/autofill/core/browser/data_model/autofill_profile.h"
#include "components/autofill/core/browser/data_model/data_model_utils.h"
#include "components/autofill/core/browser/field_types.h"
#include "components/autofill/core/browser/geo/autofill_country.h"
#include "components/autofill/core/browser/geo/phone_number_i18n.h"
#include "components/autofill/core/common/autofill_features.h"
#include "third_party/abseil-cpp/absl/strings/ascii.h"
namespace autofill {
namespace {
std::string GetRegion(const AutofillProfile& profile,
const std::string& app_locale) { … }
}
PhoneNumber::PhoneNumber(const AutofillProfile* profile) : … { … }
PhoneNumber::PhoneNumber(const PhoneNumber& number) : … { … }
PhoneNumber::~PhoneNumber() = default;
PhoneNumber& PhoneNumber::operator=(const PhoneNumber& number) { … }
bool PhoneNumber::operator==(const PhoneNumber& other) const { … }
void PhoneNumber::GetSupportedTypes(FieldTypeSet* supported_types) const { … }
std::u16string PhoneNumber::GetRawInfo(FieldType type) const { … }
void PhoneNumber::SetRawInfoWithVerificationStatus(FieldType type,
const std::u16string& value,
VerificationStatus status) { … }
void PhoneNumber::GetMatchingTypes(const std::u16string& text,
const std::string& app_locale,
FieldTypeSet* matching_types) const { … }
std::u16string PhoneNumber::GetInfoImpl(const AutofillType& type,
const std::string& app_locale) const { … }
bool PhoneNumber::SetInfoWithVerificationStatusImpl(
const AutofillType& type,
const std::u16string& value,
const std::string& app_locale,
VerificationStatus status) { … }
void PhoneNumber::UpdateCacheIfNeeded(const std::string& app_locale) const { … }
PhoneNumber::PhoneCombineHelper::PhoneCombineHelper() = default;
PhoneNumber::PhoneCombineHelper::~PhoneCombineHelper() = default;
void PhoneNumber::PhoneCombineHelper::SetInfo(FieldType field_type,
const std::u16string& value) { … }
bool PhoneNumber::PhoneCombineHelper::ParseNumber(
const AutofillProfile& profile,
const std::string& app_locale,
std::u16string* value) const { … }
bool PhoneNumber::ImportPhoneNumberToProfile(
const PhoneNumber::PhoneCombineHelper& combined_phone,
const std::string& app_locale,
AutofillProfile& profile) { … }
bool PhoneNumber::PhoneCombineHelper::IsEmpty() const { … }
}