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

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

Issue 2072963002: Remove PaymentResponse.totalAmount according to latest spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: final touch-up Created 4 years, 6 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
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFreeShippingTest.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.text.TextUtils; 10 import android.text.TextUtils;
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 } 695 }
696 } 696 }
697 697
698 /** 698 /**
699 * Called after retrieving instrument details. 699 * Called after retrieving instrument details.
700 */ 700 */
701 @Override 701 @Override
702 public void onInstrumentDetailsReady(String methodName, String stringifiedDe tails) { 702 public void onInstrumentDetailsReady(String methodName, String stringifiedDe tails) {
703 PaymentResponse response = new PaymentResponse(); 703 PaymentResponse response = new PaymentResponse();
704 response.methodName = methodName; 704 response.methodName = methodName;
705 response.totalAmount = mRawTotal.amount;
706 response.stringifiedDetails = stringifiedDetails; 705 response.stringifiedDetails = stringifiedDetails;
707 706
708 if (mContactSection != null) { 707 if (mContactSection != null) {
709 PaymentOption selectedContact = mContactSection.getSelectedItem(); 708 PaymentOption selectedContact = mContactSection.getSelectedItem();
710 if (selectedContact != null) { 709 if (selectedContact != null) {
711 // Contacts are created in show(). These should all be instances of AutofillContact. 710 // Contacts are created in show(). These should all be instances of AutofillContact.
712 assert selectedContact instanceof AutofillContact; 711 assert selectedContact instanceof AutofillContact;
713 response.payerEmail = ((AutofillContact) selectedContact).getPay erEmail(); 712 response.payerEmail = ((AutofillContact) selectedContact).getPay erEmail();
714 response.payerPhone = ((AutofillContact) selectedContact).getPay erPhone(); 713 response.payerPhone = ((AutofillContact) selectedContact).getPay erPhone();
715 } 714 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 private void closeClient() { 778 private void closeClient() {
780 if (mClient != null) mClient.close(); 779 if (mClient != null) mClient.close();
781 mClient = null; 780 mClient = null;
782 } 781 }
783 782
784 @VisibleForTesting 783 @VisibleForTesting
785 public static void setObserverForTest(PaymentRequestServiceObserverForTest o bserverForTest) { 784 public static void setObserverForTest(PaymentRequestServiceObserverForTest o bserverForTest) {
786 sObserverForTest = observerForTest; 785 sObserverForTest = observerForTest;
787 } 786 }
788 } 787 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFreeShippingTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698