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

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

Issue 2039863002: PaymentRequest: Sync up PaymentAddress with the payment request spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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: chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillAddress.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillAddress.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillAddress.java
index b6a2be2b11627488a6dc2cafd3135fd1bf769ac1..4ce8321c60f52fbd0d314acafd0f0386b7601b8b 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillAddress.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillAddress.java
@@ -47,6 +47,7 @@ public class AutofillAddress extends PaymentOption {
assert profile.getSortingCode() != null : "Sorting code should not be null";
assert profile.getCompanyName() != null : "Company name should not be null";
assert profile.getFullName() != null : "Full name should not be null";
+ assert profile.getPhoneNumber() != null : "Phone number should not be null";
mProfile = profile;
}
@@ -57,10 +58,10 @@ public class AutofillAddress extends PaymentOption {
public PaymentAddress toPaymentAddress() {
PaymentAddress result = new PaymentAddress();
- result.regionCode = mProfile.getCountryCode();
+ result.country = mProfile.getCountryCode();
result.addressLine = mProfile.getStreetAddress().split("\n");
- result.administrativeArea = mProfile.getRegion();
- result.locality = mProfile.getLocality();
+ result.region = mProfile.getRegion();
+ result.city = mProfile.getLocality();
result.dependentLocality = mProfile.getDependentLocality();
result.postalCode = mProfile.getPostalCode();
result.sortingCode = mProfile.getSortingCode();
@@ -68,6 +69,8 @@ public class AutofillAddress extends PaymentOption {
result.recipient = mProfile.getFullName();
result.languageCode = "";
result.scriptCode = "";
+ result.careOf = "";
+ result.phone = mProfile.getPhoneNumber();
if (mProfile.getLanguageCode() == null) return result;

Powered by Google App Engine
This is Rietveld 408576698