#include "components/autofill/core/common/autocomplete_parsing_util.h"
#include <vector>
#include "base/containers/fixed_flat_map.h"
#include "base/strings/strcat.h"
#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/autofill_regexes.h"
#include "components/autofill/core/common/autofill_util.h"
#include "components/autofill/core/common/html_field_types.h"
namespace autofill {
namespace {
static constexpr auto kStandardizedAttributes = …;
static constexpr int kMaxAutocompleteLengthToCheckForWellIntendedUsage = …;
static constexpr std::string_view kWellIntendedAutocompleteValuesKeywords[] = …;
static constexpr std::string_view
kNegativeMatchWellIntendedAutocompleteValuesKeywords[] = …;
bool IsContactTypeHint(const std::string& token) { … }
bool ContactTypeHintMatchesFieldType(const std::string& token,
HtmlFieldType field_type) { … }
std::optional<HtmlFieldType> ParseStandardizedAutocompleteAttribute(
std::string_view value) { … }
std::optional<HtmlFieldType> ParseProposedAutocompleteAttribute(
std::string_view value) { … }
std::optional<HtmlFieldType> ParseNonStandarizedAutocompleteAttribute(
std::string_view value) { … }
}
std::string AutocompleteParsingResult::ToString() const { … }
bool AutocompleteParsingResult::operator==(
const AutocompleteParsingResult&) const = default;
HtmlFieldType FieldTypeFromAutocompleteAttributeValue(std::string value) { … }
std::optional<AutocompleteParsingResult> ParseAutocompleteAttribute(
std::string_view autocomplete_attribute) { … }
bool IsAutocompleteTypeWrongButWellIntended(
std::string_view autocomplete_attribute) { … }
bool ShouldIgnoreAutocompleteAttribute(std::string_view autocomplete) { … }
}