OLD | NEW |
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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 | 270 |
271 getMatchingPaymentInstruments(); | 271 getMatchingPaymentInstruments(); |
272 | 272 |
273 boolean requestShipping = options != null && options.requestShipping; | 273 boolean requestShipping = options != null && options.requestShipping; |
274 boolean requestPayerPhone = options != null && options.requestPayerPhone
; | 274 boolean requestPayerPhone = options != null && options.requestPayerPhone
; |
275 boolean requestPayerEmail = options != null && options.requestPayerEmail
; | 275 boolean requestPayerEmail = options != null && options.requestPayerEmail
; |
276 | 276 |
277 List<AutofillProfile> profiles = null; | 277 List<AutofillProfile> profiles = null; |
278 if (requestShipping || requestPayerPhone || requestPayerEmail) { | 278 if (requestShipping || requestPayerPhone || requestPayerEmail) { |
279 profiles = PersonalDataManager.getInstance().getProfilesToSuggest( | 279 profiles = PersonalDataManager.getInstance().getProfilesToSuggest( |
280 false /* includeName */); | 280 false /* includeNameInLabel */); |
281 } | 281 } |
282 | 282 |
283 if (requestShipping) { | 283 if (requestShipping) { |
284 List<AutofillAddress> addresses = new ArrayList<>(); | 284 List<AutofillAddress> addresses = new ArrayList<>(); |
285 | 285 |
286 for (int i = 0; i < profiles.size(); i++) { | 286 for (int i = 0; i < profiles.size(); i++) { |
287 AutofillProfile profile = profiles.get(i); | 287 AutofillProfile profile = profiles.get(i); |
288 mAddressEditor.addPhoneNumberIfValid(profile.getPhoneNumber()); | 288 mAddressEditor.addPhoneNumberIfValid(profile.getPhoneNumber()); |
289 | 289 |
290 boolean isComplete = mAddressEditor.isProfileComplete(profile); | 290 boolean isComplete = mAddressEditor.isProfileComplete(profile); |
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1262 "PaymentRequest.CheckoutFunnel.Aborted", abortReason, | 1262 "PaymentRequest.CheckoutFunnel.Aborted", abortReason, |
1263 PaymentRequestMetrics.ABORT_REASON_MAX); | 1263 PaymentRequestMetrics.ABORT_REASON_MAX); |
1264 | 1264 |
1265 if (abortReason == PaymentRequestMetrics.ABORT_REASON_ABORTED_BY_USER) { | 1265 if (abortReason == PaymentRequestMetrics.ABORT_REASON_ABORTED_BY_USER) { |
1266 mJourneyLogger.recordJourneyStatsHistograms("UserAborted"); | 1266 mJourneyLogger.recordJourneyStatsHistograms("UserAborted"); |
1267 } else { | 1267 } else { |
1268 mJourneyLogger.recordJourneyStatsHistograms("OtherAborted"); | 1268 mJourneyLogger.recordJourneyStatsHistograms("OtherAborted"); |
1269 } | 1269 } |
1270 } | 1270 } |
1271 } | 1271 } |
OLD | NEW |