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

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

Issue 2925403002: [Payments] Create and add AutofillPaymentApp before show is called. (Closed)
Patch Set: move place Created 3 years, 6 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
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillPaymentApp.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0fa12b3e82c75343c141294438acab4d0979ad16..c8e90d9ea15d8da7f1dc292008e258418adc720d 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
@@ -471,6 +471,9 @@ public class PaymentRequestImpl implements PaymentRequest, PaymentRequestUI.Clie
}
mId = details.id;
+ // Checks whether the merchant supports autofill payment instrument before show is called.
+ mMerchantSupportsAutofillPaymentInstruments =
+ AutofillPaymentApp.merchantSupportsAutofillPaymentInstruments(mMethodData);
PaymentAppFactory.getInstance().create(mWebContents,
Collections.unmodifiableSet(mMethodData.keySet()), this /* callback */);
@@ -700,7 +703,6 @@ public class PaymentRequestImpl implements PaymentRequest, PaymentRequestUI.Clie
mPendingApps.remove(app);
} else {
mArePaymentMethodsSupported = true;
- mMerchantSupportsAutofillPaymentInstruments |= app instanceof AutofillPaymentApp;
queryApps.put(app, appMethods);
}
}
@@ -714,9 +716,6 @@ public class PaymentRequestImpl implements PaymentRequest, PaymentRequestUI.Clie
if (disconnectIfNoPaymentMethodsSupported()) return;
- // Query instruments after mMerchantSupportsAutofillPaymentInstruments has been initialized,
- // 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(), mTopLevelOrigin, mPaymentRequestOrigin,
mCertificateChain, mRawTotal, this);
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillPaymentApp.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698