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

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

Issue 2652763007: Send site certificate chain to android payment app (Closed)
Patch Set: Actually call getCertificateChain Created 3 years, 11 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 f0f2e261630836239ad7c693f876132ba5dbdc6a..7a070b253b4cb5bfd08526e5010fd412e0bb4ea3 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
@@ -22,6 +22,7 @@ import org.chromium.chrome.browser.ChromeFeatureList;
import org.chromium.chrome.browser.autofill.PersonalDataManager;
import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile;
import org.chromium.chrome.browser.favicon.FaviconHelper;
+import org.chromium.chrome.browser.pageinfo.CertificateChainHelper;
import org.chromium.chrome.browser.payments.ui.Completable;
import org.chromium.chrome.browser.payments.ui.ContactDetailsSection;
import org.chromium.chrome.browser.payments.ui.LineItem;
@@ -213,6 +214,7 @@ public class PaymentRequestImpl
private final WebContents mWebContents;
private final String mMerchantName;
private final String mOrigin;
+ private final byte[][] mCertificateChain;
private final AddressEditor mAddressEditor;
private final CardEditor mCardEditor;
private final PaymentRequestJourneyLogger mJourneyLogger = new PaymentRequestJourneyLogger();
@@ -298,6 +300,7 @@ public class PaymentRequestImpl
// The feature is available only in secure context, so it's OK to not show HTTPS.
mOrigin = UrlFormatter.formatUrlForSecurityDisplay(
webContents.getLastCommittedUrl(), false);
+ mCertificateChain = CertificateChainHelper.getCertificateChain(mWebContents);
final FaviconHelper faviconHelper = new FaviconHelper();
faviconHelper.getLocalFaviconImageForURL(Profile.getLastUsedProfile(),
@@ -537,7 +540,7 @@ 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(), mOrigin, this);
+ q.getKey().getInstruments(q.getValue(), mOrigin, mCertificateChain, this);
}
}
@@ -1050,8 +1053,9 @@ public class PaymentRequestImpl
}
}
- instrument.invokePaymentApp(mMerchantName, mOrigin, Collections.unmodifiableMap(methodData),
- mRawTotal, mRawLineItems, Collections.unmodifiableMap(modifiers), this);
+ instrument.invokePaymentApp(mMerchantName, mOrigin, 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