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

Unified Diff: ios/chrome/browser/payments/shipping_address_selection_view_controller.mm

Issue 2588913002: EarlGrey tests for Payment Request (base CL) (Closed)
Patch Set: Moved the experimental flag back to the BVC Created 3 years, 11 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/payments/payment_request_view_controller.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/payments/shipping_address_selection_view_controller.mm
diff --git a/ios/chrome/browser/payments/shipping_address_selection_view_controller.mm b/ios/chrome/browser/payments/shipping_address_selection_view_controller.mm
index e3f67166296b900ce69786990c22a2c0217e2b33..556badab1fc47fd64d4cb009a08ea07a3b71d457 100644
--- a/ios/chrome/browser/payments/shipping_address_selection_view_controller.mm
+++ b/ios/chrome/browser/payments/shipping_address_selection_view_controller.mm
@@ -21,6 +21,10 @@
#include "ios/chrome/grit/ios_strings.h"
#include "ui/base/l10n/l10n_util.h"
+using payment_request_utils::NameLabelFromAutofillProfile;
+using payment_request_utils::AddressLabelFromAutofillProfile;
+using payment_request_utils::PhoneNumberLabelFromAutofillProfile;
+
NSString* const kShippingAddressSelectionCollectionViewId =
@"kShippingAddressSelectionCollectionViewId";
@@ -97,12 +101,10 @@ typedef NS_ENUM(NSInteger, ItemType) {
autofill::AutofillProfile* shippingAddress = _shippingAddresses[i];
ShippingAddressItem* item = [[[ShippingAddressItem alloc]
initWithType:ItemTypeShippingAddress] autorelease];
- item.name = base::SysUTF16ToNSString(
- shippingAddress->GetRawInfo(autofill::NAME_FULL));
- item.address =
- payment_request_utils::AddressLabelFromAutofillProfile(shippingAddress);
- item.phoneNumber = base::SysUTF16ToNSString(
- shippingAddress->GetRawInfo(autofill::PHONE_HOME_WHOLE_NUMBER));
+ item.accessibilityTraits |= UIAccessibilityTraitButton;
+ item.name = NameLabelFromAutofillProfile(shippingAddress);
+ item.address = AddressLabelFromAutofillProfile(shippingAddress);
+ item.phoneNumber = PhoneNumberLabelFromAutofillProfile(shippingAddress);
if (shippingAddress == _selectedShippingAddress) {
item.accessoryType = MDCCollectionViewCellAccessoryCheckmark;
_selectedItem = item;
« no previous file with comments | « ios/chrome/browser/payments/payment_request_view_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698