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

Unified Diff: ios/chrome/browser/ui/payments/address_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/address_edit_mediator.mm
diff --git a/ios/chrome/browser/ui/payments/address_edit_mediator.mm b/ios/chrome/browser/ui/payments/address_edit_mediator.mm
index 1590f90c09f589085b5f7b331729f98f1e1c431e..0a2ae337033068a3d9ef0afa42f08e6053ae474a 100644
--- a/ios/chrome/browser/ui/payments/address_edit_mediator.mm
+++ b/ios/chrome/browser/ui/payments/address_edit_mediator.mm
@@ -23,7 +23,6 @@
#include "components/autofill/core/browser/personal_data_manager.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/autofill/autofill_ui_type_util.h"
@@ -173,7 +172,7 @@
autofill::CountryComboboxModel countryModel;
countryModel.SetCountries(*_paymentRequest->GetPersonalDataManager(),
base::Callback<bool(const std::string&)>(),
- GetApplicationContext()->GetApplicationLocale());
+ _paymentRequest->GetApplicationLocale());
const autofill::CountryComboboxModel::CountryVector& countriesVector =
countryModel.countries();
@@ -227,8 +226,7 @@
std::string unused;
autofill::GetAddressComponents(
base::SysNSStringToUTF8(self.selectedCountryCode),
- GetApplicationContext()->GetApplicationLocale(), &addressComponents,
- &unused);
+ _paymentRequest->GetApplicationLocale(), &addressComponents, &unused);
for (size_t lineIndex = 0; lineIndex < addressComponents.GetSize();
++lineIndex) {
@@ -328,8 +326,7 @@
self.address
? base::SysUTF16ToNSString(
payments::data_util::GetFormattedPhoneNumberForDisplay(
- *self.address,
- GetApplicationContext()->GetApplicationLocale()))
+ *self.address, _paymentRequest->GetApplicationLocale()))
: nil;
field = [[EditorField alloc]
initWithAutofillUIType:AutofillUITypeProfileHomePhoneWholeNumber
@@ -352,7 +349,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