Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Unified Diff: components/autofill/core/browser/credit_card.h

Issue 2607043002: [Autofill] Credit Card Autofill Last Used Date Experiment (Closed)
Patch Set: Add date formatter based on pattern Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..c20216c506a48df5e7dad7766da53704db404ef4 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 when the credit card was last used in autofill, show
+ // expiration date if |show_expiration_date| is true, and show time detail
+ // if |show_time_detail| is true.
+ base::string16 GetLastUsedDateForDisplay(bool show_expiration_date,
+ bool show_time_detail) 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;

Powered by Google App Engine
This is Rietveld 408576698