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

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

Issue 2287513002: [Payments] Show name and address when selecting a CC billing address. (Closed)
Patch Set: Fixed error Created 4 years, 3 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.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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 if (!parseAndValidateDetailsOrDisconnectFromClient(details)) return; 236 if (!parseAndValidateDetailsOrDisconnectFromClient(details)) return;
237 237
238 getMatchingPaymentInstruments(); 238 getMatchingPaymentInstruments();
239 239
240 boolean requestShipping = options != null && options.requestShipping; 240 boolean requestShipping = options != null && options.requestShipping;
241 boolean requestPayerPhone = options != null && options.requestPayerPhone ; 241 boolean requestPayerPhone = options != null && options.requestPayerPhone ;
242 boolean requestPayerEmail = options != null && options.requestPayerEmail ; 242 boolean requestPayerEmail = options != null && options.requestPayerEmail ;
243 243
244 List<AutofillProfile> profiles = null; 244 List<AutofillProfile> profiles = null;
245 if (requestShipping || requestPayerPhone || requestPayerEmail) { 245 if (requestShipping || requestPayerPhone || requestPayerEmail) {
246 profiles = PersonalDataManager.getInstance().getProfilesToSuggest(); 246 profiles = PersonalDataManager.getInstance().getProfilesToSuggest(
247 false /* includeName */);
247 } 248 }
248 249
249 if (requestShipping) { 250 if (requestShipping) {
250 List<AutofillAddress> addresses = new ArrayList<>(); 251 List<AutofillAddress> addresses = new ArrayList<>();
251 252
252 for (int i = 0; i < profiles.size(); i++) { 253 for (int i = 0; i < profiles.size(); i++) {
253 AutofillProfile profile = profiles.get(i); 254 AutofillProfile profile = profiles.get(i);
254 mAddressEditor.addPhoneNumberIfValid(profile.getPhoneNumber()); 255 mAddressEditor.addPhoneNumberIfValid(profile.getPhoneNumber());
255 256
256 boolean isComplete = mAddressEditor.isProfileComplete(profile); 257 boolean isComplete = mAddressEditor.isProfileComplete(profile);
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 private void recordAbortReasonHistogram(int abortReason) { 1096 private void recordAbortReasonHistogram(int abortReason) {
1096 assert abortReason < PaymentRequestMetrics.ABORT_REASON_MAX; 1097 assert abortReason < PaymentRequestMetrics.ABORT_REASON_MAX;
1097 if (mHasRecordedAbortReason) return; 1098 if (mHasRecordedAbortReason) return;
1098 1099
1099 mHasRecordedAbortReason = true; 1100 mHasRecordedAbortReason = true;
1100 RecordHistogram.recordEnumeratedHistogram( 1101 RecordHistogram.recordEnumeratedHistogram(
1101 "PaymentRequest.CheckoutFunnel.Aborted", abortReason, 1102 "PaymentRequest.CheckoutFunnel.Aborted", abortReason,
1102 PaymentRequestMetrics.ABORT_REASON_MAX); 1103 PaymentRequestMetrics.ABORT_REASON_MAX);
1103 } 1104 }
1104 } 1105 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698