#include "components/autofill/core/browser/autofill_experiments.h"
#include <string>
#include <string_view>
#include <vector>
#include "base/check.h"
#include "base/command_line.h"
#include "base/containers/contains.h"
#include "base/feature_list.h"
#include "base/metrics/field_trial_params.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "components/autofill/core/browser/data_model/iban.h"
#include "components/autofill/core/browser/logging/log_manager.h"
#include "components/autofill/core/browser/metrics/autofill_metrics.h"
#include "components/autofill/core/browser/metrics/payments/credit_card_save_metrics.h"
#include "components/autofill/core/browser/payments/payments_util.h"
#include "components/autofill/core/browser/payments_data_manager.h"
#include "components/autofill/core/browser/personal_data_manager.h"
#include "components/autofill/core/browser/ui/suggestion.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/autofill_internals/log_message.h"
#include "components/autofill/core/common/autofill_internals/logging_scope.h"
#include "components/autofill/core/common/autofill_payments_features.h"
#include "components/autofill/core/common/autofill_prefs.h"
#include "components/autofill/core/common/autofill_switches.h"
#include "components/device_reauth/device_authenticator.h"
#include "components/prefs/pref_service.h"
#include "components/strings/grit/components_strings.h"
#include "components/sync/base/features.h"
#include "components/sync/base/user_selectable_type.h"
#include "components/sync/service/sync_service.h"
#include "components/sync/service/sync_service_utils.h"
#include "components/sync/service/sync_user_settings.h"
#include "components/variations/variations_associated_data.h"
#include "google_apis/gaia/gaia_auth_util.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/ui_base_features.h"
#if BUILDFLAG(IS_MAC)
#include "base/mac/mac_util.h"
#endif
namespace autofill {
namespace {
void LogCardUploadDisabled(LogManager* log_manager, std::string_view context) { … }
void LogCardUploadEnabled(LogManager* log_manager) { … }
}
const char* const kAutofillUpstreamLaunchedCountries[] = …;
bool IsCreditCardUploadEnabled(
const syncer::SyncService* sync_service,
const std::string& user_country,
AutofillMetrics::PaymentsSigninState signin_state_for_metrics,
LogManager* log_manager) { … }
bool IsCreditCardMigrationEnabled(PersonalDataManager* personal_data_manager,
syncer::SyncService* sync_service,
bool is_test_mode,
LogManager* log_manager) { … }
bool IsInAutofillSuggestionsDisabledExperiment() { … }
bool IsCreditCardFidoAuthenticationEnabled() { … }
bool ShouldShowIbanOnSettingsPage(const std::string& user_country_code,
PrefService* pref_service) { … }
bool IsDeviceAuthAvailable(
device_reauth::DeviceAuthenticator* device_authenticator) { … }
bool IsTouchToFillPaymentMethodSupported() { … }
}