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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java » ('j') | 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 f42bb67785377e20cafaca6984e7a90ed59e3baf..09988fb499dcbbefd920cf89220ad47fab8b61a3 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
@@ -30,6 +30,7 @@ import org.chromium.components.safejson.JsonSanitizer;
import org.chromium.content.browser.ContentViewCore;
import org.chromium.content_public.browser.WebContents;
import org.chromium.mojo.system.MojoException;
+import org.chromium.mojom.payments.PaymentComplete;
import org.chromium.mojom.payments.PaymentDetails;
import org.chromium.mojom.payments.PaymentItem;
import org.chromium.mojom.payments.PaymentMethodData;
@@ -605,8 +606,8 @@ public class PaymentRequestImpl implements PaymentRequest, PaymentRequestUI.Clie
* Called when the merchant website has processed the payment.
*/
@Override
- public void complete(boolean success) {
- closeUI(success);
+ public void complete(int result) {
+ closeUI(PaymentComplete.FAIL != result);
}
/**
@@ -699,9 +700,9 @@ public class PaymentRequestImpl implements PaymentRequest, PaymentRequestUI.Clie
/**
* Closes the UI. If the client is still connected, then it's notified of UI hiding.
*/
- private void closeUI(boolean paymentSuccess) {
+ private void closeUI(boolean immediateClose) {
if (mUI != null) {
- mUI.close(paymentSuccess, new Runnable() {
+ mUI.close(immediateClose, new Runnable() {
@Override
public void run() {
if (mClient != null) mClient.onComplete();
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698