chromium/components/autofill/core/browser/form_parsing/credit_card_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/credit_card_field_parser.h"

#include <stddef.h>

#include <memory>
#include <string>
#include <string_view>
#include <utility>
#include <vector>

#include "base/containers/contains.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "components/autofill/core/browser/autofill_field.h"
#include "components/autofill/core/browser/field_types.h"
#include "components/autofill/core/browser/form_parsing/autofill_scanner.h"
#include "components/autofill/core/browser/form_parsing/form_field_parser.h"
#include "components/autofill/core/browser/form_parsing/regex_patterns.h"
#include "components/autofill/core/browser/select_control_util.h"
#include "components/autofill/core/common/autofill_clock.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/autofill_regex_constants.h"
#include "components/autofill/core/common/autofill_regexes.h"
#include "components/strings/grit/components_strings.h"
#include "ui/base/l10n/l10n_util.h"

namespace autofill {

namespace {

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

base::span<const MatchPatternRef> GetMatchPatterns(FieldType type,
                                                   ParsingContext& context) {}

// Returns true if a field that has |max_length| can fit the data for a field of
// |type|.
bool FieldCanFitDataForFieldType(uint64_t max_length, FieldType type) {}

}  // namespace

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

// static
bool CreditCardFieldParser::LikelyCardMonthSelectField(
    AutofillScanner* scanner) {}

// static
bool CreditCardFieldParser::LikelyCardYearSelectField(
    ParsingContext* context,
    AutofillScanner* scanner) {}

// static
bool CreditCardFieldParser::LikelyCardTypeSelectField(
    AutofillScanner* scanner) {}

// static
bool CreditCardFieldParser::IsGiftCardField(ParsingContext& context,
                                            AutofillScanner* scanner) {}

CreditCardFieldParser::CreditCardFieldParser()
    :{}

CreditCardFieldParser::~CreditCardFieldParser() = default;

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

bool CreditCardFieldParser::ParseExpirationDate(ParsingContext& context,
                                                AutofillScanner* scanner) {}

// static
FieldType CreditCardFieldParser::DetermineExpirationYearType(
    const AutofillField& field,
    FieldType fallback_type,
    FieldType server_hint,
    FieldType forced_field_type) {}

FieldType CreditCardFieldParser::GetExpirationYearType() const {}

bool CreditCardFieldParser::HasExpiration() const {}

// static
CreditCardFieldParser::ExpirationDateFormat
CreditCardFieldParser::DetermineExpirationDateFormat(
    const AutofillField& field,
    FieldType fallback_type,
    FieldType server_hint,
    FieldType forced_field_type) {}

}  // namespace autofill