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

Unified Diff: ios/chrome/browser/ui/payments/contact_info_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/contact_info_edit_mediator.mm
diff --git a/ios/chrome/browser/ui/payments/contact_info_edit_mediator.mm b/ios/chrome/browser/ui/payments/contact_info_edit_mediator.mm
index 70a210feedca94976dd0a22baef628ca62c5d4b5..af5c782f28af7795a3339ef3a0e03d04688fc669 100644
--- a/ios/chrome/browser/ui/payments/contact_info_edit_mediator.mm
+++ b/ios/chrome/browser/ui/payments/contact_info_edit_mediator.mm
@@ -12,7 +12,6 @@
#include "components/autofill/core/browser/field_types.h"
#include "components/payments/core/payment_request_data_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/ui/autofill/autofill_ui_type.h"
#import "ios/chrome/browser/ui/payments/payment_request_edit_consumer.h"
@@ -80,7 +79,7 @@
if (field.autofillUIType == AutofillUITypeProfileHomePhoneWholeNumber) {
const std::string countryCode =
autofill::AutofillCountry::CountryCodeForLocale(
- GetApplicationContext()->GetApplicationLocale());
+ _paymentRequest->GetApplicationLocale());
field.value =
base::SysUTF8ToNSString(payments::data_util::FormatPhoneForDisplay(
base::SysNSStringToUTF8(field.value), countryCode));
@@ -119,8 +118,7 @@
self.profile
? base::SysUTF16ToNSString(
payments::data_util::GetFormattedPhoneNumberForDisplay(
- *self.profile,
- GetApplicationContext()->GetApplicationLocale()))
+ *self.profile, _paymentRequest->GetApplicationLocale()))
: nil;
EditorField* phoneField = [[EditorField alloc]
initWithAutofillUIType:AutofillUITypeProfileHomePhoneWholeNumber
@@ -163,7 +161,7 @@
fieldType:(autofill::ServerFieldType)fieldType {
return profile ? base::SysUTF16ToNSString(profile->GetInfo(
autofill::AutofillType(fieldType),
- GetApplicationContext()->GetApplicationLocale()))
+ _paymentRequest->GetApplicationLocale()))
: nil;
}

Powered by Google App Engine
This is Rietveld 408576698