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

Unified Diff: ios/chrome/browser/ui/payments/payment_request_manager.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
« no previous file with comments | « ios/chrome/browser/ui/payments/credit_card_edit_mediator.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/payments/payment_request_manager.mm
diff --git a/ios/chrome/browser/ui/payments/payment_request_manager.mm b/ios/chrome/browser/ui/payments/payment_request_manager.mm
index bf12bced8472756eed7b6f4a4d31ac715399e1d2..fb191efa1b09949072ed2b9a1433a0f3a9fdc801 100644
--- a/ios/chrome/browser/ui/payments/payment_request_manager.mm
+++ b/ios/chrome/browser/ui/payments/payment_request_manager.mm
@@ -29,7 +29,6 @@
#include "components/payments/core/payment_request_base_delegate.h"
#include "components/payments/core/payment_request_data_util.h"
#include "components/prefs/pref_service.h"
-#include "ios/chrome/browser/application_context.h"
#include "ios/chrome/browser/autofill/personal_data_manager_factory.h"
#include "ios/chrome/browser/autofill/validation_rules_storage_factory.h"
#include "ios/chrome/browser/browser_state/chrome_browser_state.h"
@@ -380,7 +379,7 @@ struct PendingPaymentResponse {
const std::string default_country_code =
autofill::AutofillCountry::CountryCodeForLocale(
- GetApplicationContext()->GetApplicationLocale());
+ _paymentRequest->GetApplicationLocale());
_addressNormalizationManager =
base::MakeUnique<payments::AddressNormalizationManager>(
@@ -734,7 +733,7 @@ requestFullCreditCard:(const autofill::CreditCard&)creditCard
paymentResponse.shipping_address =
payments::data_util::GetPaymentAddressFromAutofillProfile(
_pendingPaymentResponse.shippingAddress,
- GetApplicationContext()->GetApplicationLocale());
+ _paymentRequest->GetApplicationLocale());
web::PaymentShippingOption* shippingOption =
_paymentRequest->selected_shipping_option();
@@ -745,7 +744,7 @@ requestFullCreditCard:(const autofill::CreditCard&)creditCard
if (_paymentRequest->request_payer_name()) {
paymentResponse.payer_name = _pendingPaymentResponse.contactAddress.GetInfo(
autofill::AutofillType(autofill::NAME_FULL),
- GetApplicationContext()->GetApplicationLocale());
+ _paymentRequest->GetApplicationLocale());
}
if (_paymentRequest->request_payer_email()) {
@@ -777,7 +776,7 @@ requestFullCreditCard:(const autofill::CreditCard&)creditCard
(const autofill::AutofillProfile&)shippingAddress {
payments::PaymentAddress address =
payments::data_util::GetPaymentAddressFromAutofillProfile(
- shippingAddress, GetApplicationContext()->GetApplicationLocale());
+ shippingAddress, _paymentRequest->GetApplicationLocale());
[_paymentRequestJsManager updateShippingAddress:address
completionHandler:nil];
[self setUnblockEventQueueTimer];
« no previous file with comments | « ios/chrome/browser/ui/payments/credit_card_edit_mediator.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698