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

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

Issue 2739033004: Send origin of the iframe browsing context (Closed)
Patch Set: Really fix serviceworker part Created 3 years, 9 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/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 644351f9abf46a8ffa47467b941f5ca766259a61..edd54e6af079a05478b09f49d63e0d27fd7e5509 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;
@@ -355,6 +356,8 @@ public class PaymentRequestImpl
assert renderFrameHost != null;
mRenderFrameHost = renderFrameHost;
+ mSchemelessIFrameOriginForPaymentApp = UrlFormatter.formatUrlForSecurityDisplay(
+ mRenderFrameHost.getLastCommittedURL(), false /* omit scheme for payment apps. */);
mWebContents = WebContentsStatics.fromRenderFrameHost(renderFrameHost);
mSchemelessOriginForPaymentApp = UrlFormatter.formatUrlForSecurityDisplay(
@@ -658,8 +661,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);
}
}
@@ -1181,8 +1184,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);

Powered by Google App Engine
This is Rietveld 408576698