| 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 360ab4ad67ee38eef702f31cb2ffa1f82a82e97e..86fb915b674b867a6d4fa73adf964a429686260a 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
|
| @@ -804,8 +804,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();
|
| }
|
| }
|
|
|
| @@ -816,6 +821,12 @@ public class PaymentRequestImpl implements PaymentRequest, PaymentRequestUI.Clie
|
| }
|
| }
|
|
|
| + // If the payment method was an Autofill credit card, record its use.
|
| + if (mPaymentMethodsSection.getSelectedItem() instanceof AutofillPaymentInstrument) {
|
| + PersonalDataManager.getInstance().recordAndLogCreditCardUse(
|
| + mPaymentMethodsSection.getSelectedItem().getIdentifier());
|
| + }
|
| +
|
| mClient.onPaymentResponse(response);
|
| }
|
|
|
|
|