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

Unified Diff: components/autofill/core/browser/personal_data_manager.cc

Issue 2607043002: [Autofill] Credit Card Autofill Last Used Date Experiment (Closed)
Patch Set: Show expiration date if keyboard accessory is enabled Created 4 years 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/personal_data_manager.cc
diff --git a/components/autofill/core/browser/personal_data_manager.cc b/components/autofill/core/browser/personal_data_manager.cc
index b58bc6cdea9578efe5813cd47a7e7ff28eacd533..0306e05b4b068e3025b4d434a4643b057b12e0f0 100644
--- a/components/autofill/core/browser/personal_data_manager.cc
+++ b/components/autofill/core/browser/personal_data_manager.cc
@@ -1624,8 +1624,13 @@ std::vector<Suggestion> PersonalDataManager::GetSuggestionsForCards(
// cardholder name. The label should never repeat the value.
if (type.GetStorableType() == CREDIT_CARD_NUMBER) {
suggestion->value = credit_card->TypeAndLastFourDigits();
- suggestion->label = credit_card->GetInfo(
- AutofillType(CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR), app_locale_);
+ if (IsAutofillCreditCardLastUsedDateDisplayExperimentEnabled() &&
+ !IsKeyboardAccessoryEnabled()) {
rkaplow 2017/01/09 21:54:17 if !IsKeyboardAccessoryEnabled(), do we want the u
jiahuiguo 2017/01/18 00:13:45 We will adopt the keyboard accessory in later expe
+ suggestion->label = credit_card->LastUsedDateAsString();
csashi 2017/01/03 20:54:06 Is the intent of the experiment to display last us
jiahuiguo 2017/01/18 00:13:45 It was, but after discussion with Alex, we may not
+ } else {
+ suggestion->label = credit_card->GetInfo(
+ AutofillType(CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR), app_locale_);
+ }
if (IsAutofillCreditCardPopupLayoutExperimentEnabled())
ModifyAutofillCreditCardSuggestion(suggestion);
} else if (credit_card->number().empty()) {

Powered by Google App Engine
This is Rietveld 408576698