| Index: chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
|
| index bf5bde924677c1bba4284c0353a185a0bad81ba1..c198b8c7b85a9e1095961f4f70e6be9111d7008a 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
|
| @@ -940,8 +940,13 @@ public class PaymentRequestImpl implements PaymentRequest, PaymentRequestUI.Clie
|
| // Shipping addresses are created in show(). These should all be instances of
|
| // AutofillAddress.
|
| assert selectedShippingAddress instanceof AutofillAddress;
|
| - response.shippingAddress =
|
| - ((AutofillAddress) selectedShippingAddress).toPaymentAddress();
|
| + AutofillAddress selectedAutofillAddress = (AutofillAddress) selectedShippingAddress;
|
| +
|
| + // Record the use of the profile.
|
| + PersonalDataManager.getInstance().recordAndLogProfileUse(
|
| + selectedAutofillAddress.getProfile().getGUID());
|
| +
|
| + response.shippingAddress = selectedAutofillAddress.toPaymentAddress();
|
| }
|
| }
|
|
|
| @@ -952,6 +957,13 @@ public class PaymentRequestImpl implements PaymentRequest, PaymentRequestUI.Clie
|
| }
|
| }
|
|
|
| + // If the payment method was an Autofill credit card with an identifier, record its use.
|
| + if (mPaymentMethodsSection.getSelectedItem() instanceof AutofillPaymentInstrument
|
| + && !mPaymentMethodsSection.getSelectedItem().getIdentifier().isEmpty()) {
|
| + PersonalDataManager.getInstance().recordAndLogCreditCardUse(
|
| + mPaymentMethodsSection.getSelectedItem().getIdentifier());
|
| + }
|
| +
|
| mUI.showProcessingMessage();
|
| mClient.onPaymentResponse(response);
|
| }
|
|
|