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

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

Issue 2501593003: Implement the new basic card specification. (Closed)
Patch Set: Update the tests to ignore exception when parsing method-specific data in renderer per issue discus… Created 3 years, 12 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 unified diff | Download patch
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.content.Intent; 8 import android.content.Intent;
9 import android.graphics.Bitmap; 9 import android.graphics.Bitmap;
10 import android.os.Handler; 10 import android.os.Handler;
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 533
534 // Payment methods are required. 534 // Payment methods are required.
535 if (methods == null || methods.length == 0) return null; 535 if (methods == null || methods.length == 0) return null;
536 536
537 for (int j = 0; j < methods.length; j++) { 537 for (int j = 0; j < methods.length; j++) {
538 // Payment methods should be non-empty. 538 // Payment methods should be non-empty.
539 if (TextUtils.isEmpty(methods[j])) return null; 539 if (TextUtils.isEmpty(methods[j])) return null;
540 result.put(methods[j], methodData[i]); 540 result.put(methods[j], methodData[i]);
541 } 541 }
542 542
543 paymentMethodsCollector.addAcceptedPaymentMethodsIfRecognized(method s); 543 paymentMethodsCollector.addAcceptedPaymentMethodsIfRecognized(method Data[i]);
544 } 544 }
545
545 return Collections.unmodifiableMap(result); 546 return Collections.unmodifiableMap(result);
546 } 547 }
547 548
548 @Override 549 @Override
549 public void onPaymentAppCreated(PaymentApp paymentApp) { 550 public void onPaymentAppCreated(PaymentApp paymentApp) {
550 mApps.add(paymentApp); 551 mApps.add(paymentApp);
551 } 552 }
552 553
553 @Override 554 @Override
554 public void onAllPaymentAppsCreated() { 555 public void onAllPaymentAppsCreated() {
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 "PaymentRequest.CheckoutFunnel.Aborted", abortReason, 1501 "PaymentRequest.CheckoutFunnel.Aborted", abortReason,
1501 PaymentRequestMetrics.ABORT_REASON_MAX); 1502 PaymentRequestMetrics.ABORT_REASON_MAX);
1502 1503
1503 if (abortReason == PaymentRequestMetrics.ABORT_REASON_ABORTED_BY_USER) { 1504 if (abortReason == PaymentRequestMetrics.ABORT_REASON_ABORTED_BY_USER) {
1504 mJourneyLogger.recordJourneyStatsHistograms("UserAborted"); 1505 mJourneyLogger.recordJourneyStatsHistograms("UserAborted");
1505 } else { 1506 } else {
1506 mJourneyLogger.recordJourneyStatsHistograms("OtherAborted"); 1507 mJourneyLogger.recordJourneyStatsHistograms("OtherAborted");
1507 } 1508 }
1508 } 1509 }
1509 } 1510 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698