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

Unified Diff: components/autofill/core/browser/ui/card_unmask_prompt_controller_impl.cc

Issue 2538543002: [Payments] Add detailed error messages and title for card unmask prompt. (Closed)
Patch Set: Addressed Rouslan's comments 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/ui/card_unmask_prompt_controller_impl.cc
diff --git a/components/autofill/core/browser/ui/card_unmask_prompt_controller_impl.cc b/components/autofill/core/browser/ui/card_unmask_prompt_controller_impl.cc
index a922b5a2c750ace7090a7dba9699034d8e959e62..d8e664c8ec20c9b1ea25669074e722824e444579 100644
--- a/components/autofill/core/browser/ui/card_unmask_prompt_controller_impl.cc
+++ b/components/autofill/core/browser/ui/card_unmask_prompt_controller_impl.cc
@@ -83,7 +83,7 @@ void CardUnmaskPromptControllerImpl::OnVerificationResult(
case AutofillClient::TRY_AGAIN_FAILURE: {
error_message = l10n_util::GetStringUTF16(
- IDS_AUTOFILL_CARD_UNMASK_PROMPT_ERROR_TRY_AGAIN);
+ IDS_AUTOFILL_CARD_UNMASK_PROMPT_ERROR_TRY_AGAIN_CVC);
break;
}
@@ -219,15 +219,11 @@ base::string16 CardUnmaskPromptControllerImpl::GetWindowTitle() const {
// The iOS UI has less room for the title so it shows a shorter string.
return l10n_util::GetStringUTF16(IDS_AUTOFILL_CARD_UNMASK_PROMPT_TITLE);
#else
- int ids;
- if (reason_ == AutofillClient::UNMASK_FOR_AUTOFILL &&
- ShouldRequestExpirationDate()) {
- ids = IDS_AUTOFILL_CARD_UNMASK_PROMPT_UPDATE_TITLE;
- }
- else {
- ids = IDS_AUTOFILL_CARD_UNMASK_PROMPT_TITLE;
- }
- return l10n_util::GetStringFUTF16(ids, card_.TypeAndLastFourDigits());
+ return l10n_util::GetStringFUTF16(
+ ShouldRequestExpirationDate()
+ ? IDS_AUTOFILL_CARD_UNMASK_PROMPT_EXPIRED_TITLE
+ : IDS_AUTOFILL_CARD_UNMASK_PROMPT_TITLE,
+ card_.TypeAndLastFourDigits());
#endif
}

Powered by Google App Engine
This is Rietveld 408576698