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

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

Issue 2162493002: Revert of Credit card editor for PaymentRequest UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/ui/PaymentOption.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentOption.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentOption.java
index 6b0356a9ad0cbeb33873c1fb3ad4a689d55bbe7e..c57bdedad09b0c8ab3455d0982435b1e05a58fce 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentOption.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentOption.java
@@ -15,19 +15,19 @@
public static final int NO_ICON = 0;
protected boolean mIsComplete;
- private String mId;
+ private final String mId;
+ private final int mIcon;
@Nullable private String mLabel;
@Nullable private String mSublabel;
- private int mIcon;
private boolean mIsValid = true;
/**
* Constructs a payment option.
*
- * @param id The identifier.
- * @param label The label.
+ * @param id The identifier.
+ * @param label The label.
* @param sublabel The optional sublabel.
- * @param icon The drawable icon identifier or NO_ICON.
+ * @param icon The drawable icon identifier or NO_ICON.
*/
public PaymentOption(String id, @Nullable String label, @Nullable String sublabel, int icon) {
mId = id;
@@ -64,37 +64,19 @@
}
/**
- * Updates the identifier, label, and sublabel of this option. Called after the user has edited
- * this option.
+ * Updates the label and sublabel of this option. Called after the user has edited this option.
*
- * @param id The new id to use. Should not be null.
* @param label The new label to use. Should not be null.
* @param sublabel The new sublabel to use. Can be null.
*/
- protected void updateIdentifierAndLabels(String id, String label, @Nullable String sublabel) {
- updateIdentifierLabelsAndIcon(id, label, sublabel, mIcon);
+ protected void updateLabels(String label, @Nullable String sublabel) {
+ mLabel = label;
+ mSublabel = sublabel;
}
/**
- * Updates the identifier, label, sublabel, and icon of this option. Called after the user has
- * edited this option.
- *
- * @param id The new id to use. Should not be null.
- * @param label The new label to use. Should not be null.
- * @param sublabel The new sublabel to use. Can be null.
- * @param icon The drawable icon identifier or NO_ICON.
- */
- protected void updateIdentifierLabelsAndIcon(
- String id, String label, @Nullable String sublabel, int icon) {
- mId = id;
- mLabel = label;
- mSublabel = sublabel;
- mIcon = icon;
- }
-
- /**
- * The identifier for the drawable icon for this payment option. For example, R.drawable.pr_visa
- * or NO_ICON.
+ * The identifier for the drawable icon for this payment option. For example,
+ * R.drawable.visa_card_issuer_icon or NO_ICON.
*/
public int getDrawableIconId() {
return mIcon;

Powered by Google App Engine
This is Rietveld 408576698