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

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

Issue 2530793002: PaymentApp: Allow multiple payment method names for one instrument. (Closed)
Patch Set: Remove a superfluous word from a comment Created 4 years 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentInstrument.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillPaymentInstrument.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillPaymentInstrument.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillPaymentInstrument.java
index 6013fa5ec918f80fde423c2fec88b6ff3827ee20..aa80ffdb902518f6c06ab14bc5e44cd5c98fd57f 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillPaymentInstrument.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillPaymentInstrument.java
@@ -22,7 +22,10 @@ import org.chromium.payments.mojom.PaymentMethodData;
import java.io.IOException;
import java.io.StringWriter;
+import java.util.HashSet;
import java.util.List;
+import java.util.Map;
+import java.util.Set;
import javax.annotation.Nullable;
@@ -64,13 +67,16 @@ public class AutofillPaymentInstrument extends PaymentInstrument
}
@Override
- public String getInstrumentMethodName() {
- return mCard.getBasicCardPaymentType();
+ public Set<String> getInstrumentMethodNames() {
+ Set<String> result = new HashSet<>();
+ result.add(mCard.getBasicCardPaymentType());
+ return result;
}
@Override
- public void getInstrumentDetails(String unusedMerchantName, String unusedOrigin,
- PaymentItem unusedTotal, List<PaymentItem> unusedCart, PaymentMethodData unusedDetails,
+ public void invokePaymentApp(String unusedMerchantName, String unusedOrigin,
+ PaymentItem unusedTotal, List<PaymentItem> unusedCart,
+ Map<String, PaymentMethodData> unusedMethodData,
InstrumentDetailsCallback callback) {
// The billing address should never be null for a credit card at this point.
assert mBillingAddress != null;
@@ -101,7 +107,7 @@ public class AutofillPaymentInstrument extends PaymentInstrument
mIsWaitingForFullCardDetails = false;
// Show the loading UI while the address gets normalized.
- mCallback.loadingInstrumentDetails();
+ mCallback.onInstrumentDetailsLoadingWithoutUI();
// Wait for the billing address normalization before sending the instrument details.
if (mIsWaitingForBillingNormalization) {
@@ -290,4 +296,4 @@ public class AutofillPaymentInstrument extends PaymentInstrument
public AutofillProfile getBillingAddress() {
return mBillingAddress;
}
-}
+}
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentInstrument.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698