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

Unified Diff: ios/chrome/browser/ui/payments/contact_info_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/contact_info_edit_coordinator.mm
diff --git a/ios/chrome/browser/ui/payments/contact_info_edit_coordinator.mm b/ios/chrome/browser/ui/payments/contact_info_edit_coordinator.mm
index aa0691417efeb8d97ceef95385dabb00154feede..ee359bf141f4fcbc8e3223d57e7d2a56762dc290 100644
--- a/ios/chrome/browser/ui/payments/contact_info_edit_coordinator.mm
+++ b/ios/chrome/browser/ui/payments/contact_info_edit_coordinator.mm
@@ -15,7 +15,6 @@
#include "components/autofill/core/common/autofill_constants.h"
#include "components/payments/core/payments_profile_comparator.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/contact_info_edit_mediator.h"
@@ -98,7 +97,7 @@ using ::AutofillTypeFromAutofillUIType;
case AutofillUITypeProfileHomePhoneWholeNumber: {
const std::string countryCode =
autofill::AutofillCountry::CountryCodeForLocale(
- GetApplicationContext()->GetApplicationLocale());
+ self.paymentRequest->GetApplicationLocale());
if (!autofill::IsValidPhoneNumber(base::SysNSStringToUTF16(field.value),
countryCode)) {
return l10n_util::GetNSString(
@@ -140,7 +139,7 @@ using ::AutofillTypeFromAutofillUIType;
profile.SetInfo(autofill::AutofillType(
AutofillTypeFromAutofillUIType(field.autofillUIType)),
base::SysNSStringToUTF16(field.value),
- GetApplicationContext()->GetApplicationLocale());
+ self.paymentRequest->GetApplicationLocale());
}
if (!self.profile) {

Powered by Google App Engine
This is Rietveld 408576698