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

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

Issue 2515853002: [Payments] Fix new billing address label. (Closed)
Patch Set: Created 4 years, 1 month 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.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 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 } 785 }
786 mAddressEditor.edit(toEdit, new Callback<AutofillAddress>() { 786 mAddressEditor.edit(toEdit, new Callback<AutofillAddress>() {
787 @Override 787 @Override
788 public void onResult(AutofillAddress completeAddress) { 788 public void onResult(AutofillAddress completeAddress) {
789 if (mUI == null) return; 789 if (mUI == null) return;
790 790
791 if (completeAddress == null) { 791 if (completeAddress == null) {
792 mShippingAddressesSection.setSelectedItemIndex(SectionInform ation.NO_SELECTION); 792 mShippingAddressesSection.setSelectedItemIndex(SectionInform ation.NO_SELECTION);
793 providePaymentInformation(); 793 providePaymentInformation();
794 } else { 794 } else {
795 // Get the shipping address label for the profile.
796 completeAddress.getProfile().setLabel(
797 PersonalDataManager.getInstance()
798 .getShippingAddressLabelForPaymentRequest(
799 completeAddress.getProfile()));
800 completeAddress.completeAddress(completeAddress.getProfile() );
please use gerrit instead 2016/11/18 21:56:22 I don't see the need for calling "completeAddress"
sebsg 2016/11/21 16:07:09 Same as other explanation :)
801
795 if (toEdit == null) mShippingAddressesSection.addAndSelectIt em(completeAddress); 802 if (toEdit == null) mShippingAddressesSection.addAndSelectIt em(completeAddress);
796 mCardEditor.updateBillingAddressIfComplete(completeAddress); 803 mCardEditor.updateBillingAddressIfComplete(completeAddress);
797 mClient.onShippingAddressChange(completeAddress.toPaymentAdd ress()); 804 mClient.onShippingAddressChange(completeAddress.toPaymentAdd ress());
798 } 805 }
799 } 806 }
800 }); 807 });
801 } 808 }
802 809
803 private void editContact(final AutofillContact toEdit) { 810 private void editContact(final AutofillContact toEdit) {
804 if (toEdit != null) { 811 if (toEdit != null) {
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 "PaymentRequest.CheckoutFunnel.Aborted", abortReason, 1181 "PaymentRequest.CheckoutFunnel.Aborted", abortReason,
1175 PaymentRequestMetrics.ABORT_REASON_MAX); 1182 PaymentRequestMetrics.ABORT_REASON_MAX);
1176 1183
1177 if (abortReason == PaymentRequestMetrics.ABORT_REASON_ABORTED_BY_USER) { 1184 if (abortReason == PaymentRequestMetrics.ABORT_REASON_ABORTED_BY_USER) {
1178 mJourneyLogger.recordJourneyStatsHistograms("UserAborted"); 1185 mJourneyLogger.recordJourneyStatsHistograms("UserAborted");
1179 } else { 1186 } else {
1180 mJourneyLogger.recordJourneyStatsHistograms("OtherAborted"); 1187 mJourneyLogger.recordJourneyStatsHistograms("OtherAborted");
1181 } 1188 }
1182 } 1189 }
1183 } 1190 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698