chromium/components/autofill/core/browser/form_parsing/name_field_parser.cc

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/autofill/core/browser/form_parsing/name_field_parser.h"

#include <memory>
#include <string_view>

#include "base/feature_list.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/raw_ptr_exclusion.h"
#include "base/strings/string_util.h"
#include "components/autofill/core/browser/autofill_type.h"
#include "components/autofill/core/browser/form_parsing/autofill_scanner.h"
#include "components/autofill/core/browser/form_parsing/regex_patterns.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/autofill_regex_constants.h"

namespace autofill {
namespace {

base::span<const MatchPatternRef> GetMatchPatterns(std::string_view name,
                                                   ParsingContext& context) {}

// A form field that can parse a full name field.
class FullNameField : public NameFieldParser {};

// A form field that parses a first name field and two last name fields as they
// are used in Hispanic/Latinx names.
class FirstTwoLastNamesField : public NameFieldParser {};

// A form field that can parse a first and last name field.
class FirstLastNameField : public NameFieldParser {};

}  // namespace

// static
std::unique_ptr<FormFieldParser> NameFieldParser::Parse(
    ParsingContext& context,
    AutofillScanner* scanner) {}

// This is overridden in concrete subclasses.
void NameFieldParser::AddClassifications(
    FieldCandidatesMap& field_candidates) const {}

// static
std::unique_ptr<FullNameField> FullNameField::Parse(ParsingContext& context,
                                                    AutofillScanner* scanner) {}

void FullNameField::AddClassifications(
    FieldCandidatesMap& field_candidates) const {}

FullNameField::FullNameField(AutofillField* field) :{}

FirstTwoLastNamesField::FirstTwoLastNamesField() = default;

// static
std::unique_ptr<FirstTwoLastNamesField> FirstTwoLastNamesField::Parse(
    ParsingContext& context,
    AutofillScanner* scanner) {}

// static
std::unique_ptr<FirstTwoLastNamesField>
FirstTwoLastNamesField::ParseComponentNames(ParsingContext& context,
                                            AutofillScanner* scanner) {}

void FirstTwoLastNamesField::AddClassifications(
    FieldCandidatesMap& field_candidates) const {}

std::unique_ptr<FirstLastNameField>
FirstLastNameField::ParseNameSurnameLabelSequence(ParsingContext& context,
                                                  AutofillScanner* scanner) {}

std::unique_ptr<FirstLastNameField>
FirstLastNameField::ParseSharedNameLabelSequence(ParsingContext& context,
                                                 AutofillScanner* scanner) {}

// static
std::unique_ptr<FirstLastNameField>
FirstLastNameField::ParseSpecificComponentSequence(ParsingContext& context,
                                                   AutofillScanner* scanner) {}

// static
std::unique_ptr<FirstLastNameField> FirstLastNameField::Parse(
    ParsingContext& context,
    AutofillScanner* scanner) {}

FirstLastNameField::FirstLastNameField() = default;

void FirstLastNameField::AddClassifications(
    FieldCandidatesMap& field_candidates) const {}

}  // namespace autofill