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

Unified Diff: ios/chrome/browser/ui/payments/credit_card_edit_coordinator.mm

Issue 2971003002: [Payment Request] Queries application locale from payments::PaymentRequest (Closed)
Patch Set: rebase Created 3 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
Index: ios/chrome/browser/ui/payments/credit_card_edit_coordinator.mm
diff --git a/ios/chrome/browser/ui/payments/credit_card_edit_coordinator.mm b/ios/chrome/browser/ui/payments/credit_card_edit_coordinator.mm
index a84724d9c4901d5c4e138844fc84fadf09a59b99..8ac854452ef67350dc187316d82be12cc0acf979 100644
--- a/ios/chrome/browser/ui/payments/credit_card_edit_coordinator.mm
+++ b/ios/chrome/browser/ui/payments/credit_card_edit_coordinator.mm
@@ -18,7 +18,6 @@
#include "components/payments/core/autofill_payment_instrument.h"
#include "components/payments/core/payment_instrument.h"
#include "components/strings/grit/components_strings.h"
-#include "ios/chrome/browser/application_context.h"
#include "ios/chrome/browser/payments/payment_request.h"
#import "ios/chrome/browser/ui/autofill/autofill_ui_type_util.h"
#import "ios/chrome/browser/ui/payments/credit_card_edit_mediator.h"
@@ -223,12 +222,12 @@ bool IsValidCreditCardNumber(const base::string16& card_number,
creditCard.SetInfo(
autofill::AutofillType(autofill::CREDIT_CARD_EXP_MONTH),
base::SysNSStringToUTF16(expMonth),
- GetApplicationContext()->GetApplicationLocale());
+ _paymentRequest->GetApplicationLocale());
NSString* expYear = fieldComponents[1];
creditCard.SetInfo(
autofill::AutofillType(autofill::CREDIT_CARD_EXP_4_DIGIT_YEAR),
base::SysNSStringToUTF16(expYear),
- GetApplicationContext()->GetApplicationLocale());
+ _paymentRequest->GetApplicationLocale());
} else if (field.autofillUIType == AutofillUITypeCreditCardSaveToChrome) {
saveCreditCard = [field.value boolValue];
} else if (field.autofillUIType == AutofillUITypeCreditCardBillingAddress) {
@@ -237,7 +236,7 @@ bool IsValidCreditCardNumber(const base::string16& card_number,
creditCard.SetInfo(autofill::AutofillType(AutofillTypeFromAutofillUIType(
field.autofillUIType)),
base::SysNSStringToUTF16(field.value),
- GetApplicationContext()->GetApplicationLocale());
+ _paymentRequest->GetApplicationLocale());
}
}

Powered by Google App Engine
This is Rietveld 408576698