// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_FIELD_H_ #define COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_FIELD_H_ #include #include "base/compiler_specific.h" #include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/autofill/core/browser/autofill_type.h" #include "components/autofill/core/browser/form_field.h" namespace autofill { class AutofillField; class AutofillScanner; class CreditCardField : public FormField { public: ~CreditCardField() override; static scoped_ptr Parse(AutofillScanner* scanner); protected: void AddClassifications(FieldCandidatesMap* field_candidates) const override; private: friend class CreditCardFieldTest; // Returns true if |scanner| points to a field that looks like a month // for a credit card. i.e. it contains the current year and // the next few years. static bool LikelyCardYearSelectField(AutofillScanner* scanner); // Returns true if |scanner| points to a