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

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

Issue 2030193002: Add 'total' field to 'PaymentDetails'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase, address comments, and add more tests 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/ui/PaymentInformation.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentInformation.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentInformation.java
index 1f9e586e03158790f2d4ba17b304ee67ba6d0c6a..70dd3de8c9eb1eaa5de0fa59f9db250d5f30fe4c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentInformation.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentInformation.java
@@ -4,13 +4,11 @@
package org.chromium.chrome.browser.payments.ui;
-import java.util.ArrayList;
-
/**
* The data to show in the PaymentRequest UI when first showing the UI.
*/
public class PaymentInformation {
- private final ArrayList<LineItem> mLineItems;
+ private final LineItem mTotal;
private final SectionInformation mShippingAddresses;
private final SectionInformation mShippingOptions;
private final SectionInformation mPaymentMethods;
@@ -25,8 +23,7 @@ public class PaymentInformation {
*/
public PaymentInformation(LineItem totalPrice, PaymentOption defaultShippingAddress,
PaymentOption defaultShippingOption, PaymentOption defaultPaymentMethod) {
- mLineItems = new ArrayList<LineItem>(1);
- mLineItems.add(totalPrice);
+ mTotal = totalPrice;
mShippingAddresses = new SectionInformation(
PaymentRequestUI.TYPE_SHIPPING_ADDRESSES, defaultShippingAddress);
mShippingOptions = new SectionInformation(
@@ -36,12 +33,12 @@ public class PaymentInformation {
}
/**
- * Returns the line items on the bill.
+ * Returns the total price on the bill.
*
- * @return The line items on the bill.
+ * @return The total price on the bill.
*/
- public ArrayList<LineItem> getLineItems() {
- return mLineItems;
+ public LineItem getTotal() {
+ return mTotal;
}
/**

Powered by Google App Engine
This is Rietveld 408576698