| Index: chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentAppFactory.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentAppFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentAppFactory.java
|
| index 69681e9fa519d71f7212d87263cbd26d3e0f5094..7430f597742a9bb689ecedb1f6bfff15e782da21 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentAppFactory.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentAppFactory.java
|
| @@ -4,6 +4,8 @@
|
|
|
| package org.chromium.chrome.browser.payments;
|
|
|
| +import android.content.Context;
|
| +
|
| import org.chromium.base.VisibleForTesting;
|
| import org.chromium.content_public.browser.WebContents;
|
|
|
| @@ -26,8 +28,11 @@ public class PaymentAppFactory {
|
| public interface PaymentAppFactoryAddition {
|
| /**
|
| * Builds instances of payment apps.
|
| + *
|
| + * @param context The application context.
|
| + * @param webContents The web contents that invoked PaymentRequest.
|
| */
|
| - List<PaymentApp> create(WebContents webContents);
|
| + List<PaymentApp> create(Context context, WebContents webContents);
|
| }
|
|
|
| /**
|
| @@ -45,10 +50,13 @@ public class PaymentAppFactory {
|
| *
|
| * @param webContents The web contents where PaymentRequest was invoked.
|
| */
|
| - public static List<PaymentApp> create(WebContents webContents) {
|
| + public static List<PaymentApp> create(Context context, WebContents webContents) {
|
| List<PaymentApp> result = new ArrayList<>(2);
|
| - result.add(new AutofillPaymentApp(webContents));
|
| - if (sAdditionalFactory != null) result.addAll(sAdditionalFactory.create(webContents));
|
| + result.add(new AutofillPaymentApp(context, webContents));
|
| + if (sAdditionalFactory != null) {
|
| + result.addAll(
|
| + sAdditionalFactory.create(context, webContents));
|
| + }
|
| return result;
|
| }
|
| }
|
|
|