| Index: ios/chrome/browser/payments/payment_request_view_controller.mm
|
| diff --git a/ios/chrome/browser/payments/payment_request_view_controller.mm b/ios/chrome/browser/payments/payment_request_view_controller.mm
|
| index 55775161c5ca586413c3f3238f104dea3106ad46..7275c35b53b1eb175214e3f406a4ae46116491e2 100644
|
| --- a/ios/chrome/browser/payments/payment_request_view_controller.mm
|
| +++ b/ios/chrome/browser/payments/payment_request_view_controller.mm
|
| @@ -14,6 +14,7 @@
|
| #include "components/autofill/core/browser/credit_card.h"
|
| #include "components/autofill/core/browser/field_types.h"
|
| #include "components/autofill/core/browser/personal_data_manager.h"
|
| +#include "components/strings/grit/components_strings.h"
|
| #include "ios/chrome/browser/application_context.h"
|
| #import "ios/chrome/browser/payments/cells/page_info_item.h"
|
| #import "ios/chrome/browser/payments/cells/payment_method_item.h"
|
| @@ -33,6 +34,10 @@
|
| #include "ui/base/l10n/l10n_util.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
|
|
| +using payment_request_utils::NameLabelFromAutofillProfile;
|
| +using payment_request_utils::AddressLabelFromAutofillProfile;
|
| +using payment_request_utils::PhoneNumberLabelFromAutofillProfile;
|
| +
|
| NSString* const kPaymentRequestCollectionViewId =
|
| @"kPaymentRequestCollectionViewId";
|
|
|
| @@ -106,6 +111,8 @@ typedef NS_ENUM(NSInteger, ItemType) {
|
| NSForegroundColorAttributeName : [UIColor lightGrayColor]
|
| }
|
| forState:UIControlStateDisabled];
|
| + [_cancelButton
|
| + setAccessibilityLabel:l10n_util::GetNSString(IDS_ACCNAME_CANCEL)];
|
| [self navigationItem].leftBarButtonItem = _cancelButton;
|
|
|
| // Set up right (pay) button.
|
| @@ -316,12 +323,9 @@ typedef NS_ENUM(NSInteger, ItemType) {
|
|
|
| - (void)fillShippingAddressItem:(ShippingAddressItem*)item
|
| withAddress:(autofill::AutofillProfile*)address {
|
| - item.name =
|
| - base::SysUTF16ToNSString(address->GetRawInfo(autofill::NAME_FULL));
|
| - item.address =
|
| - payment_request_utils::AddressLabelFromAutofillProfile(address);
|
| - item.phoneNumber = base::SysUTF16ToNSString(
|
| - address->GetRawInfo(autofill::PHONE_HOME_WHOLE_NUMBER));
|
| + item.name = NameLabelFromAutofillProfile(address);
|
| + item.address = AddressLabelFromAutofillProfile(address);
|
| + item.phoneNumber = PhoneNumberLabelFromAutofillProfile(address);
|
| }
|
|
|
| #pragma mark UICollectionViewDataSource
|
|
|