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

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

Issue 2142473002: Update strings in the credit card unmask dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | components/autofill_strings.grdp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bca4af7762df8460542a41d01f48f1bf822ef79f..a7fdb3202347f9f45470235484959101e062cc30 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
@@ -220,46 +220,37 @@ base::string16 CardUnmaskPromptControllerImpl::GetWindowTitle() const {
return l10n_util::GetStringUTF16(IDS_AUTOFILL_CARD_UNMASK_PROMPT_TITLE);
#else
int ids;
- if (reason_ == AutofillClient::UNMASK_FOR_PAYMENT_REQUEST)
- ids = IDS_AUTOFILL_CARD_UNMASK_PROMPT_PAY_TITLE;
- else if (ShouldRequestExpirationDate())
+ if (reason_ == AutofillClient::UNMASK_FOR_AUTOFILL &&
+ ShouldRequestExpirationDate()) {
ids = IDS_AUTOFILL_CARD_UNMASK_PROMPT_UPDATE_TITLE;
- else
+ }
+ else {
ids = IDS_AUTOFILL_CARD_UNMASK_PROMPT_TITLE;
+ }
return l10n_util::GetStringFUTF16(ids, card_.TypeAndLastFourDigits());
#endif
}
base::string16 CardUnmaskPromptControllerImpl::GetInstructionsMessage() const {
+#if defined(OS_IOS)
int ids;
- if (reason_ == AutofillClient::UNMASK_FOR_PAYMENT_REQUEST) {
- ids = card_.type() == kAmericanExpressCard
- ? IDS_AUTOFILL_CARD_UNMASK_PROMPT_PAY_INSTRUCTIONS_AMEX
- : IDS_AUTOFILL_CARD_UNMASK_PROMPT_PAY_INSTRUCTIONS;
- } else if (ShouldRequestExpirationDate()) {
- ids = card_.type() == kAmericanExpressCard
- ? IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_EXPIRED_AMEX
- : IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_EXPIRED;
+ if (reason_ == AutofillClient::UNMASK_FOR_AUTOFILL &&
+ ShouldRequestExpirationDate()) {
+ ids = IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_EXPIRED;
} else {
- ids = card_.type() == kAmericanExpressCard
- ? IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_AMEX
- : IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS;
+ ids = IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS;
}
-
-#if defined(OS_IOS)
// The iOS UI shows the card details in the instructions text since they
// don't fit in the title.
return l10n_util::GetStringFUTF16(ids, card_.TypeAndLastFourDigits());
#else
- return l10n_util::GetStringUTF16(ids);
+ return l10n_util::GetStringUTF16(
+ IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS);
#endif
}
base::string16 CardUnmaskPromptControllerImpl::GetOkButtonLabel() const {
- return l10n_util::GetStringUTF16(
- reason_ == AutofillClient::UNMASK_FOR_PAYMENT_REQUEST
- ? IDS_AUTOFILL_CARD_UNMASK_CONTINUE_BUTTON
- : IDS_AUTOFILL_CARD_UNMASK_CONFIRM_BUTTON);
+ return l10n_util::GetStringUTF16(IDS_AUTOFILL_CARD_UNMASK_CONFIRM_BUTTON);
}
int CardUnmaskPromptControllerImpl::GetCvcImageRid() const {
« no previous file with comments | « no previous file | components/autofill_strings.grdp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698