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..c50dcb45e1164f3f0ea0ed6aa1bc0d2561ff9990 100644 |
| --- a/components/autofill/core/browser/credit_card.h |
| +++ b/components/autofill/core/browser/credit_card.h |
| @@ -174,8 +174,14 @@ class CreditCard : public AutofillDataModel { |
| // Sets |number_| to |number| and computes the appropriate card |type_|. |
| void SetNumber(const base::string16& number); |
| - // Logs the number of days since the credit card was last used and records its |
| - // use. |
| + // Returns the date(MM/DD) when the credit card was last used in autofill. |
| + base::string16 LastUsedDateAsString( |
| + bool show_time_detail, |
|
Jared Saul
2017/01/18 18:43:44
Based on outcome of my previous comment, should th
jiahuiguo
2017/01/18 22:18:13
Done.
|
| + bool show_expiration_date, |
|
Jared Saul
2017/01/18 18:43:44
super nit: Likewise, show_expiration_date has come
jiahuiguo
2017/01/18 22:18:13
Done.
|
| + const std::string& app_locale) const; |
| + |
| + // Logs the number of days since the credit card was last used and records |
| + // its use. |
| void RecordAndLogUse(); |
| // Converts a string representation of a month (such as "February" or "feb." |
| @@ -185,6 +191,9 @@ class CreditCard : public AutofillDataModel { |
| const std::string& app_locale, |
| int* num); |
| + base::string16 GetShortMonthLabel(int32_t zero_base_month_index, |
| + const std::string& app_locale) const; |
| + |
| // Returns whether the credit card is expired based on |current_time|. |
| bool IsExpired(const base::Time& current_time) const; |
| @@ -213,6 +222,9 @@ class CreditCard : public AutofillDataModel { |
| base::string16 Expiration4DigitYearAsString() const; |
| base::string16 Expiration2DigitYearAsString() const; |
| + // Padding month and day info to exactly 2 digits |
|
Jared Saul
2017/01/18 18:43:44
nit: Add period; looks like that's the norm around
jiahuiguo
2017/01/18 22:18:13
Done.
|
| + base::string16 PadTo2Digit(int32_t dateInfo) const; |
|
Mathieu
2017/01/18 14:42:15
can this be in the anonymous namespace in the cc f
Mathieu
2017/01/18 14:42:15
nit: date_info
jiahuiguo
2017/01/18 22:18:13
Done.
jiahuiguo
2017/01/18 22:18:13
Good point, done.
|
| + |
| // Sets |expiration_month_| to the integer conversion of |text| and returns |
| // whether the operation was successful. |
| bool SetExpirationMonthFromString(const base::string16& text, |