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

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

Issue 2116583002: Credit card editor for PaymentRequest UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comments in personal_data_manager_android.h Created 4 years, 5 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/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);
}
}

Powered by Google App Engine
This is Rietveld 408576698