#include "chrome/browser/extensions/api/autofill_private/autofill_util.h"
#include <stddef.h>
#include <memory>
#include <utility>
#include <vector>
#include "base/memory/raw_ptr.h"
#include "base/strings/string_split.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/api/settings_private/prefs_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/autofill_private.h"
#include "chrome/common/pref_names.h"
#include "chrome/grit/branded_strings.h"
#include "components/autofill/core/browser/address_data_manager.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/credit_card.h"
#include "components/autofill/core/browser/data_model/iban.h"
#include "components/autofill/core/browser/field_type_utils.h"
#include "components/autofill/core/browser/field_types.h"
#include "components/autofill/core/browser/geo/autofill_country.h"
#include "components/autofill/core/browser/payments_data_manager.h"
#include "components/autofill/core/browser/ui/country_combobox_model.h"
#include "components/autofill/core/common/autofill_payments_features.h"
#include "components/autofill/core/common/autofill_prefs.h"
#include "components/autofill/core/common/credit_card_network_identifiers.h"
#include "components/prefs/pref_service.h"
#include "components/strings/grit/components_strings.h"
#include "components/sync/base/user_selectable_type.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/webui/web_ui_util.h"
#include "ui/gfx/image/image.h"
autofill_private;
namespace {
std::string GetStringFromProfile(const autofill::AutofillProfile& profile,
const autofill::FieldType& type) { … }
autofill_private::AddressRecordType ConvertProfileRecordType(
autofill::AutofillProfile::RecordType record_type) { … }
autofill_private::AddressEntry ProfileToAddressEntry(
const autofill::AutofillProfile& profile,
const std::u16string& label) { … }
std::string CardNetworkToIconResourceIdString(const std::string& network) { … }
autofill_private::IbanEntry IbanToIbanEntry(
const autofill::Iban& iban,
const autofill::PersonalDataManager& personal_data) { … }
}
namespace extensions::autofill_util {
AddressEntryList GenerateAddressList(
const autofill::PersonalDataManager& personal_data) { … }
CountryEntryList GenerateCountryList(
const autofill::PersonalDataManager& personal_data,
bool for_account_address_profile) { … }
CreditCardEntryList GenerateCreditCardList(
const autofill::PersonalDataManager& personal_data) { … }
IbanEntryList GenerateIbanList(
const autofill::PersonalDataManager& personal_data) { … }
std::optional<api::autofill_private::AccountInfo> GetAccountInfo(
const autofill::PersonalDataManager& personal_data) { … }
autofill_private::CreditCardEntry CreditCardToCreditCardEntry(
const autofill::CreditCard& credit_card,
const autofill::PersonalDataManager& personal_data,
bool mask_local_cards) { … }
}