Chromium Code Reviews| Index: components/autofill/core/browser/credit_card.h |
| diff --git a/components/autofill/core/browser/credit_card.h b/components/autofill/core/browser/credit_card.h |
| index d0a8a6eee7ee8b3b720d6e44035359baee0be127..f11e82d6a75a1399aec6ac17a06a6a88fc0d0aee 100644 |
| --- a/components/autofill/core/browser/credit_card.h |
| +++ b/components/autofill/core/browser/credit_card.h |
| @@ -174,6 +174,9 @@ class CreditCard : public AutofillDataModel { |
| // Sets |number_| to |number| and computes the appropriate card |type_|. |
| void SetNumber(const base::string16& number); |
| + // Returns the date(MM/DD) when the credit card was last used in autofill |
|
Jared Saul
2017/01/04 22:01:24
nit: Add period at end
jiahuiguo
2017/01/18 00:13:44
Done.
|
| + base::string16 LastUsedDateAsString() const; |
| + |
| // Logs the number of days since the credit card was last used and records its |
| // use. |
| void RecordAndLogUse(); |
| @@ -213,6 +216,9 @@ class CreditCard : public AutofillDataModel { |
| base::string16 Expiration4DigitYearAsString() const; |
| base::string16 Expiration2DigitYearAsString() const; |
| + // Formatting month or day info to exact 2 digits |
|
csashi
2017/01/03 20:54:06
Is it not "month *and* day" ?
csashi
2017/01/03 20:54:06
exactly 2 digits
jiahuiguo
2017/01/18 00:13:45
Done.
jiahuiguo
2017/01/18 00:13:45
Done.
|
| + base::string16 FormatDateTo2Digit(int dateInfo) const; |
|
csashi
2017/01/03 20:54:06
Is it 2 digits? MM/DD is 4 digits.
Jared Saul
2017/01/04 22:01:23
Yeah but this function only takes a certain part o
jiahuiguo
2017/01/18 00:13:45
Done.
jiahuiguo
2017/01/18 00:13:45
It only formats month or day for each call, return
|
| + |
| // Sets |expiration_month_| to the integer conversion of |text| and returns |
| // whether the operation was successful. |
| bool SetExpirationMonthFromString(const base::string16& text, |