Chromium Code Reviews| 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..af7fb02c5f8d0f538a8f7f7146b5b1ce8766a53b 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; |
| @@ -579,7 +580,7 @@ public class PaymentRequestImpl implements PaymentRequest, PaymentRequestUI.Clie |
| @Override |
| public void onDismiss() { |
| disconnectFromClientWithDebugMessage("Dialog dismissed"); |
| - closeUI(false); |
| + closeUI(true); |
|
please use gerrit instead
2016/06/16 00:31:45
false
|
| } |
| @Override |
| @@ -597,7 +598,7 @@ public class PaymentRequestImpl implements PaymentRequest, PaymentRequestUI.Clie |
| if (sObserverForTest != null) sObserverForTest.onPaymentRequestServiceUnableToAbort(); |
| } else { |
| closeClient(); |
| - closeUI(false); |
| + closeUI(true); |
|
please use gerrit instead
2016/06/16 00:31:46
false
|
| } |
| } |
| @@ -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); |
| } |
| /** |
| @@ -615,7 +616,7 @@ public class PaymentRequestImpl implements PaymentRequest, PaymentRequestUI.Clie |
| @Override |
| public void close() { |
| closeClient(); |
| - closeUI(false); |
| + closeUI(true); |
|
please use gerrit instead
2016/06/16 00:31:45
false
|
| } |
| /** |
| @@ -624,7 +625,7 @@ public class PaymentRequestImpl implements PaymentRequest, PaymentRequestUI.Clie |
| @Override |
| public void onConnectionError(MojoException e) { |
| closeClient(); |
| - closeUI(false); |
| + closeUI(true); |
|
please use gerrit instead
2016/06/16 00:31:45
false
|
| } |
| /** |
| @@ -687,7 +688,7 @@ public class PaymentRequestImpl implements PaymentRequest, PaymentRequestUI.Clie |
| @Override |
| public void onInstrumentDetailsError() { |
| disconnectFromClientWithDebugMessage("Failed to retrieve payment instrument details"); |
| - closeUI(false); |
| + closeUI(true); |
|
please use gerrit instead
2016/06/16 00:31:45
false
|
| } |
| private void disconnectFromClientWithDebugMessage(String debugMessage) { |
| @@ -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(); |