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

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

Issue 2866063004: payment app android
Patch Set: payment app android Created 3 years, 7 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/ServiceWorkerPaymentInstrument.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentInstrument.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentInstrument.java
index bdd2c2f5528d817f6d6f3ed0c14fa8331b4125e0..cf2ccefc8edab5a5689e69bdf6a917328490e5e7 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentInstrument.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentInstrument.java
@@ -25,8 +25,8 @@ import java.util.Set;
*/
public class ServiceWorkerPaymentInstrument extends PaymentInstrument {
private final WebContents mWebContents;
- private final long mAppRegistrationId;
- private final ServiceWorkerPaymentAppBridge.Option mOption;
+ private final long mSWRegistrationId;
+ private final String mInstrumentId;
private final Set<String> mMethodNames;
/**
@@ -39,15 +39,14 @@ public class ServiceWorkerPaymentInstrument extends PaymentInstrument {
* @param appRegistrationId The registration id of the corresponding service worker payment app.
* @param option A payment app option from the payment app.
*/
- public ServiceWorkerPaymentInstrument(WebContents webContents, long appRegistrationId,
- ServiceWorkerPaymentAppBridge.Option option) {
- super(Long.toString(appRegistrationId) + "#" + option.id, option.label, null /* icon */,
- option.icon);
+ public ServiceWorkerPaymentInstrument(WebContents webContents, long swRegistrationId,
+ String instrumentId, String label, Set<String> methodNames) {
+ super(Long.toString(swRegistrationId) + "#" + instrumentId, label, null /* sublabel */,
+ null /* icon */);
mWebContents = webContents;
- mAppRegistrationId = appRegistrationId;
- mOption = option;
-
- mMethodNames = new HashSet<String>(option.enabledMethods);
+ mSWRegistrationId = swRegistrationId;
+ mInstrumentId = instrumentId;
+ mMethodNames = methodNames;
}
@Override
@@ -60,9 +59,9 @@ public class ServiceWorkerPaymentInstrument extends PaymentInstrument {
byte[][] unusedCertificateChain, Map<String, PaymentMethodData> methodData,
PaymentItem total, List<PaymentItem> displayItems,
Map<String, PaymentDetailsModifier> modifiers, InstrumentDetailsCallback callback) {
- ServiceWorkerPaymentAppBridge.invokePaymentApp(mWebContents, mAppRegistrationId, mOption.id,
- origin, iframeOrigin, new HashSet<>(methodData.values()), total, displayItems,
- new HashSet<>(modifiers.values()), callback);
+ ServiceWorkerPaymentAppBridge.invokePaymentApp(mWebContents, mSWRegistrationId,
+ mInstrumentId, origin, iframeOrigin, new HashSet<>(methodData.values()), total,
+ displayItems, new HashSet<>(modifiers.values()), callback);
}
@Override

Powered by Google App Engine
This is Rietveld 408576698