OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.chrome.browser.payments; | 5 package org.chromium.chrome.browser.payments; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 import android.graphics.Bitmap; | 8 import android.graphics.Bitmap; |
9 import android.os.Handler; | 9 import android.os.Handler; |
10 import android.support.v4.util.ArrayMap; | 10 import android.support.v4.util.ArrayMap; |
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 | 925 |
926 instrument.getInstrumentDetails(mMerchantName, mOrigin, mRawTotal, mRawL
ineItems, | 926 instrument.getInstrumentDetails(mMerchantName, mOrigin, mRawTotal, mRawL
ineItems, |
927 mMethodData.get(instrument.getInstrumentMethodName()), this); | 927 mMethodData.get(instrument.getInstrumentMethodName()), this); |
928 recordSuccessFunnelHistograms("PayClicked"); | 928 recordSuccessFunnelHistograms("PayClicked"); |
929 return !(instrument instanceof AutofillPaymentInstrument); | 929 return !(instrument instanceof AutofillPaymentInstrument); |
930 } | 930 } |
931 | 931 |
932 @Override | 932 @Override |
933 public void onDismiss() { | 933 public void onDismiss() { |
934 disconnectFromClientWithDebugMessage("Dialog dismissed"); | 934 disconnectFromClientWithDebugMessage("Dialog dismissed"); |
935 closeUI(true); | |
936 recordAbortReasonHistogram(PaymentRequestMetrics.ABORT_REASON_ABORTED_BY
_USER); | 935 recordAbortReasonHistogram(PaymentRequestMetrics.ABORT_REASON_ABORTED_BY
_USER); |
937 } | 936 } |
938 | 937 |
939 private void disconnectFromClientWithDebugMessage(String debugMessage) { | 938 private void disconnectFromClientWithDebugMessage(String debugMessage) { |
940 disconnectFromClientWithDebugMessage(debugMessage, PaymentErrorReason.US
ER_CANCEL); | 939 disconnectFromClientWithDebugMessage(debugMessage, PaymentErrorReason.US
ER_CANCEL); |
941 } | 940 } |
942 | 941 |
943 private void disconnectFromClientWithDebugMessage(String debugMessage, int r
eason) { | 942 private void disconnectFromClientWithDebugMessage(String debugMessage, int r
eason) { |
944 Log.d(TAG, debugMessage); | 943 Log.d(TAG, debugMessage); |
945 if (mClient != null) mClient.onError(reason); | 944 if (mClient != null) mClient.onError(reason); |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1291 "PaymentRequest.CheckoutFunnel.Aborted", abortReason, | 1290 "PaymentRequest.CheckoutFunnel.Aborted", abortReason, |
1292 PaymentRequestMetrics.ABORT_REASON_MAX); | 1291 PaymentRequestMetrics.ABORT_REASON_MAX); |
1293 | 1292 |
1294 if (abortReason == PaymentRequestMetrics.ABORT_REASON_ABORTED_BY_USER) { | 1293 if (abortReason == PaymentRequestMetrics.ABORT_REASON_ABORTED_BY_USER) { |
1295 mJourneyLogger.recordJourneyStatsHistograms("UserAborted"); | 1294 mJourneyLogger.recordJourneyStatsHistograms("UserAborted"); |
1296 } else { | 1295 } else { |
1297 mJourneyLogger.recordJourneyStatsHistograms("OtherAborted"); | 1296 mJourneyLogger.recordJourneyStatsHistograms("OtherAborted"); |
1298 } | 1297 } |
1299 } | 1298 } |
1300 } | 1299 } |
OLD | NEW |