| 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
|
|
|