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

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

Issue 2054823002: PaymentRequest: complete() method should take PaymentComplete enum value. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
Index: chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentResultUIManager.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentResultUIManager.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentResultUIManager.java
index ebb171dbc3a5bad56937078755d84acf1325447c..2ec9a117a13325ff3df17b4d340749c1d37c981c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentResultUIManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentResultUIManager.java
@@ -63,12 +63,15 @@ public class PaymentResultUIManager {
/**
* Updates the UI to display whether or not the payment request was successful.
*
- * @param paymentSuccess Whether or not the payment request was successful.
- * @param callback Callback to run upon dismissal.
+ * @param shouldCloseImmediately If true, this function will immediately dismiss the dialog
+ * without describing the error.
+ * @param callback Callback to run upon dismissal.
*/
- public void update(boolean paymentSuccess, final Runnable callback) {
- if (mResultLayout.getParent() == null || paymentSuccess) {
- // Dismiss the dialog immediately.
+ public void update(boolean shouldCloseImmediately, final Runnable callback) {
+ if (mResultLayout.getParent() == null || shouldCloseImmediately) {
+ // The shouldCloseImmediately boolean is true when the merchant calls
+ // instrumentResponse.complete("success") or instrumentResponse.complete("")
+ // in JavaScript.
callback.run();
} else {
// Describe the error.

Powered by Google App Engine
This is Rietveld 408576698