#include "components/autofill/core/browser/geo/address_rewriter.h"
#include <memory>
#include <string_view>
#include <unordered_map>
#include "base/i18n/case_conversion.h"
#include "base/no_destructor.h"
#include "base/strings/strcat.h"
#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/browser/grit/autofill_address_rewriter_resources_map.h"
#include "third_party/re2/src/re2/re2.h"
#include "third_party/zlib/google/compression_utils.h"
#include "ui/base/resource/resource_bundle.h"
namespace autofill {
namespace {
CompiledRule;
CompiledRuleVector;
CompiledRuleCache;
std::string GetMapKey(const std::string& region) { … }
static bool ExtractRegionRulesData(const std::string& region,
std::string* out_data) { … }
void CompileRulesFromData(const std::string& data_string,
CompiledRuleVector* compiled_rules) { … }
class Cache { … };
}
std::u16string AddressRewriter::RewriteForCountryCode(
const AddressCountryCode& country_code,
const std::u16string& normalized_text) { … }
AddressRewriter AddressRewriter::ForCountryCode(
const AddressCountryCode& country_code) { … }
AddressRewriter AddressRewriter::ForCustomRules(
const std::string& custom_rules) { … }
std::u16string AddressRewriter::Rewrite(const std::u16string& text) const { … }
}