| Index: chrome/browser/autofill/validation.h
|
| diff --git a/chrome/browser/autofill/validation.h b/chrome/browser/autofill/validation.h
|
| index f8e923bc837b283ce99814833d646f4af56c0611..b29f5dd08aac1df5d086e82f4f38df8fff270132 100644
|
| --- a/chrome/browser/autofill/validation.h
|
| +++ b/chrome/browser/autofill/validation.h
|
| @@ -7,12 +7,34 @@
|
|
|
| #include "base/string16.h"
|
|
|
| +namespace base {
|
| +
|
| +class Time;
|
| +
|
| +} // namespace base;
|
| +
|
| namespace autofill {
|
|
|
| // Returns true if |text| looks like a valid credit card number.
|
| // Uses the Luhn formula to validate the number.
|
| bool IsValidCreditCardNumber(const string16& text);
|
|
|
| +// Returns true if |text| is a valid expiration year. Must have |num_digits|
|
| +// digits, and must be |now|'s year or later.
|
| +bool IsValidCreditCardExpirationYear(const string16& text,
|
| + size_t num_digits,
|
| + const base::Time& now);
|
| +
|
| +// Returns true if |text| is a valid expiration date of the form YYYY-MM,
|
| +// MM/YYYY. Number of year digits is determined by |num_digits|. Must be
|
| +// |now|'s month or later.
|
| +bool IsValidCreditCardExpirationDate(const string16& text,
|
| + size_t num_digits,
|
| + const base::Time& now);
|
| +
|
| +// Returns true if |text| looks like a valid CSC.
|
| +bool IsValidCreditCardCSC(const string16& text);
|
| +
|
| } // namespace autofill
|
|
|
| #endif // CHROME_BROWSER_AUTOFILL_VALIDATION_H_
|
|
|