#include "third_party/libaddressinput/chromium/chrome_address_validator.h"
#include <cmath>
#include "base/check.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/task/single_thread_task_runner.h"
#include "third_party/libaddressinput/chromium/addressinput_util.h"
#include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_data.h"
#include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_normalizer.h"
#include "third_party/libaddressinput/src/cpp/include/libaddressinput/source.h"
#include "third_party/libaddressinput/src/cpp/include/libaddressinput/storage.h"
#include "third_party/libaddressinput/src/cpp/src/rule.h"
namespace autofill {
namespace {
AddressData;
AddressField;
AddressNormalizer;
BuildCallback;
FieldProblemMap;
PreloadSupplier;
Rule;
Source;
Storage;
ADMIN_AREA;
DEPENDENT_LOCALITY;
POSTAL_CODE;
static const int kMaxAttemptsNumber = …;
}
AddressValidator::AddressValidator(std::unique_ptr<Source> source,
std::unique_ptr<Storage> storage,
LoadRulesListener* load_rules_listener)
: … { … }
AddressValidator::~AddressValidator() { … }
void AddressValidator::LoadRules(const std::string& region_code) { … }
std::vector<std::pair<std::string, std::string>>
AddressValidator::GetRegionSubKeys(const std::string& region_code,
const std::string& language) { … }
AddressValidator::Status AddressValidator::ValidateAddress(
const AddressData& address,
const FieldProblemMap* filter,
FieldProblemMap* problems) const { … }
bool AddressValidator::NormalizeAddress(AddressData* address) const { … }
bool AddressValidator::AreRulesLoadedForRegion(const std::string& region_code) { … }
AddressValidator::AddressValidator() : … { … }
base::TimeDelta AddressValidator::GetBaseRetryPeriod() const { … }
void AddressValidator::Validated(bool success,
const AddressData&,
const FieldProblemMap&) { … }
void AddressValidator::RulesLoaded(bool success,
const std::string& region_code,
int) { … }
void AddressValidator::RetryLoadRules(const std::string& region_code) { … }
}