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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java

Issue 2529443002: Show custom error message in payments UI. (Closed)
Patch Set: Created 4 years 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« 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