| 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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 recordAbortReasonHistogram( | 552 recordAbortReasonHistogram( |
| 553 PaymentRequestMetrics.ABORT_REASON_INVALID_DATA_FROM_RENDERE
R); | 553 PaymentRequestMetrics.ABORT_REASON_INVALID_DATA_FROM_RENDERE
R); |
| 554 return; | 554 return; |
| 555 } | 555 } |
| 556 | 556 |
| 557 if (!parseAndValidateDetailsOrDisconnectFromClient(details)) return; | 557 if (!parseAndValidateDetailsOrDisconnectFromClient(details)) return; |
| 558 | 558 |
| 559 if (mUiShippingOptions.isEmpty() && mShippingAddressesSection.getSelecte
dItem() != null) { | 559 if (mUiShippingOptions.isEmpty() && mShippingAddressesSection.getSelecte
dItem() != null) { |
| 560 mShippingAddressesSection.getSelectedItem().setInvalid(); | 560 mShippingAddressesSection.getSelectedItem().setInvalid(); |
| 561 mShippingAddressesSection.setSelectedItemIndex(SectionInformation.IN
VALID_SELECTION); | 561 mShippingAddressesSection.setSelectedItemIndex(SectionInformation.IN
VALID_SELECTION); |
| 562 mShippingAddressesSection.setErrorMessage(details.error); |
| 562 } | 563 } |
| 563 | 564 |
| 564 if (mPaymentInformationCallback != null) { | 565 if (mPaymentInformationCallback != null) { |
| 565 providePaymentInformation(); | 566 providePaymentInformation(); |
| 566 } else { | 567 } else { |
| 567 mUI.updateOrderSummarySection(mUiShoppingCart); | 568 mUI.updateOrderSummarySection(mUiShoppingCart); |
| 568 mUI.updateSection(PaymentRequestUI.TYPE_SHIPPING_OPTIONS, mUiShippin
gOptions); | 569 mUI.updateSection(PaymentRequestUI.TYPE_SHIPPING_OPTIONS, mUiShippin
gOptions); |
| 569 } | 570 } |
| 570 } | 571 } |
| 571 | 572 |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1291 "PaymentRequest.CheckoutFunnel.Aborted", abortReason, | 1292 "PaymentRequest.CheckoutFunnel.Aborted", abortReason, |
| 1292 PaymentRequestMetrics.ABORT_REASON_MAX); | 1293 PaymentRequestMetrics.ABORT_REASON_MAX); |
| 1293 | 1294 |
| 1294 if (abortReason == PaymentRequestMetrics.ABORT_REASON_ABORTED_BY_USER) { | 1295 if (abortReason == PaymentRequestMetrics.ABORT_REASON_ABORTED_BY_USER) { |
| 1295 mJourneyLogger.recordJourneyStatsHistograms("UserAborted"); | 1296 mJourneyLogger.recordJourneyStatsHistograms("UserAborted"); |
| 1296 } else { | 1297 } else { |
| 1297 mJourneyLogger.recordJourneyStatsHistograms("OtherAborted"); | 1298 mJourneyLogger.recordJourneyStatsHistograms("OtherAborted"); |
| 1298 } | 1299 } |
| 1299 } | 1300 } |
| 1300 } | 1301 } |
| OLD | NEW |