| Index: chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
|
| index bc8f617aa6c64756986dd2d1370fc75a1f6e40df..8b26ffc146a3cf48023819e6bcc9bb95a2626f8e 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
|
| @@ -252,6 +252,7 @@ public class PaymentRequestImpl
|
| private final WebContents mWebContents;
|
| private final String mSchemelessOriginForPaymentApp;
|
| private final String mOriginForDisplay;
|
| + private final String mSchemelessIFrameOriginForPaymentApp;
|
| private final String mMerchantName;
|
| private final byte[][] mCertificateChain;
|
| private final AddressEditor mAddressEditor;
|
| @@ -354,6 +355,7 @@ public class PaymentRequestImpl
|
| assert renderFrameHost != null;
|
|
|
| mRenderFrameHost = renderFrameHost;
|
| +
|
| mWebContents = WebContentsStatics.fromRenderFrameHost(renderFrameHost);
|
|
|
| mSchemelessOriginForPaymentApp = UrlFormatter.formatUrlForSecurityDisplay(
|
| @@ -362,6 +364,9 @@ public class PaymentRequestImpl
|
| mOriginForDisplay = UrlFormatter.formatUrlForSecurityDisplay(
|
| mWebContents.getLastCommittedUrl(), true /* include scheme in display */);
|
|
|
| + mSchemelessIFrameOriginForPaymentApp = UrlFormatter.formatUrlForSecurityDisplay(
|
| + mRenderFrameHost.getLastCommittedURL(), false /* omit scheme for payment apps. */);
|
| +
|
| mMerchantName = mWebContents.getTitle();
|
|
|
| mCertificateChain = CertificateChainHelper.getCertificateChain(mWebContents);
|
| @@ -652,8 +657,8 @@ public class PaymentRequestImpl
|
| // so a fast response from a non-autofill payment app at the front of the app list does not
|
| // cause NOT_SUPPORTED payment rejection.
|
| for (Map.Entry<PaymentApp, Map<String, PaymentMethodData>> q : queryApps.entrySet()) {
|
| - q.getKey().getInstruments(
|
| - q.getValue(), mSchemelessOriginForPaymentApp, mCertificateChain, this);
|
| + q.getKey().getInstruments(q.getValue(), mSchemelessOriginForPaymentApp,
|
| + mSchemelessIFrameOriginForPaymentApp, mCertificateChain, this);
|
| }
|
| }
|
|
|
| @@ -1175,8 +1180,9 @@ public class PaymentRequestImpl
|
| }
|
|
|
| instrument.invokePaymentApp(mMerchantName, mSchemelessOriginForPaymentApp,
|
| - mCertificateChain, Collections.unmodifiableMap(methodData), mRawTotal,
|
| - mRawLineItems, Collections.unmodifiableMap(modifiers), this);
|
| + mSchemelessIFrameOriginForPaymentApp, mCertificateChain,
|
| + Collections.unmodifiableMap(methodData), mRawTotal, mRawLineItems,
|
| + Collections.unmodifiableMap(modifiers), this);
|
|
|
| recordSuccessFunnelHistograms("PayClicked");
|
| return !(instrument instanceof AutofillPaymentInstrument);
|
|
|