Index: chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillContact.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillContact.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillContact.java |
index 6c6c220f3749bac6d069129ff6ab7d33278cd846..645c093a8ff2eb527c84bb7d642f53fb6a93dc48 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillContact.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillContact.java |
@@ -34,7 +34,7 @@ public class AutofillContact extends PaymentOption { |
super(profile.getGUID(), null, null, PaymentOption.NO_ICON); |
mProfile = profile; |
mIsComplete = isComplete; |
- setPhoneEmail(phone, email); |
+ setGuidPhoneEmail(profile.getGUID(), phone, email); |
} |
/** @return Email address. Null if the merchant did not request it or data is incomplete. */ |
@@ -58,21 +58,23 @@ public class AutofillContact extends PaymentOption { |
} |
/** |
- * Updates the email address and phone number and marks this information "complete." Called |
- * after the user has edited this contact information. Updates the label and sublabel. |
+ * Updates the profile guid, email address, and phone number and marks this information |
+ * "complete." Called after the user has edited this contact information. Updates the |
+ * identifier, label, and sublabel. |
* |
+ * @param guid The new identifier to use. Should not be null or empty. |
* @param phone The new phone number to use. If not empty, this will be the primary label. |
* @param email The new email address to use. If phone is empty, this will be the primary label. |
*/ |
- public void completeContact(@Nullable String phone, @Nullable String email) { |
+ public void completeContact(String guid, @Nullable String phone, @Nullable String email) { |
mIsComplete = true; |
- setPhoneEmail(phone, email); |
+ setGuidPhoneEmail(guid, phone, email); |
} |
- private void setPhoneEmail(@Nullable String phone, @Nullable String email) { |
+ private void setGuidPhoneEmail(String guid, @Nullable String phone, @Nullable String email) { |
mPayerPhone = TextUtils.isEmpty(phone) ? null : phone; |
mPayerEmail = TextUtils.isEmpty(email) ? null : email; |
- updateLabels(mPayerPhone == null ? mPayerEmail : mPayerPhone, |
+ updateIdentifierAndLabels(guid, mPayerPhone == null ? mPayerEmail : mPayerPhone, |
mPayerPhone == null ? null : mPayerEmail); |
} |
} |