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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java

Issue 2515853002: [Payments] Fix new billing address label. (Closed)
Patch Set: Addressed comments Created 4 years, 1 month 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: chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
index 71006e169b283e761c2fb71c35dd01b72f9002b5..e1f0049ab507061e685c2964c9a4258cd7d8b2a0 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
@@ -792,6 +792,13 @@ public class PaymentRequestImpl implements PaymentRequest, PaymentRequestUI.Clie
mShippingAddressesSection.setSelectedItemIndex(SectionInformation.NO_SELECTION);
providePaymentInformation();
} else {
+ // Get the shipping address label for the profile.
+ completeAddress.getProfile().setLabel(
+ PersonalDataManager.getInstance()
+ .getShippingAddressLabelForPaymentRequest(
+ completeAddress.getProfile()));
+ completeAddress.updateProfileLabel();
please use gerrit instead 2016/11/21 16:34:53 Nit: Can you put the PDM.getShippingAddressLabel()
sebsg 2016/11/22 15:06:21 Wish I thought of that. thanks!
+
if (toEdit == null) mShippingAddressesSection.addAndSelectItem(completeAddress);
mCardEditor.updateBillingAddressIfComplete(completeAddress);
mClient.onShippingAddressChange(completeAddress.toPaymentAddress());

Powered by Google App Engine
This is Rietveld 408576698