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 05447b47b31f54d2e45aa4168e5c4a514a54677f..37c9fd19d7195b4e7820961ef80b5c4d7c8b72a7 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 |
@@ -33,7 +33,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. */ |
@@ -52,21 +52,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); |
} |
} |