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

Unified Diff: ios/chrome/browser/ui/payments/credit_card_edit_mediator.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_mediator.mm
diff --git a/ios/chrome/browser/ui/payments/credit_card_edit_mediator.mm b/ios/chrome/browser/ui/payments/credit_card_edit_mediator.mm
index 6d6c970dc006b4adce3060868130b08e1e7881c3..cf087c9d96cd64f7b2b86feca605708e0b2ca01e 100644
--- a/ios/chrome/browser/ui/payments/credit_card_edit_mediator.mm
+++ b/ios/chrome/browser/ui/payments/credit_card_edit_mediator.mm
@@ -13,7 +13,6 @@
#include "components/payments/core/payment_request_data_util.h"
#include "components/payments/core/strings_util.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/payments/payment_request_util.h"
#import "ios/chrome/browser/ui/autofill/autofill_ui_type.h"
@@ -266,10 +265,9 @@ using ::payment_request_util::GetBillingAddressLabelFromAutofillProfile;
// Card holder name field.
NSString* creditCardName =
- _creditCard
- ? autofill::GetCreditCardName(
- *_creditCard, GetApplicationContext()->GetApplicationLocale())
- : nil;
+ _creditCard ? autofill::GetCreditCardName(
+ *_creditCard, _paymentRequest->GetApplicationLocale())
+ : nil;
fieldKey = [NSNumber numberWithInt:AutofillUITypeCreditCardHolderFullName];
EditorField* creditCardNameField = self.fieldsMap[fieldKey];
if (!creditCardNameField) {

Powered by Google App Engine
This is Rietveld 408576698