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..4a8baf3261f8ab7fbb5cd0d8d8b2526e50aff1cd 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,13 @@ 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( |
+ ((AutofillPaymentInstrument) mPaymentMethodsSection.getSelectedItem()) |
please use gerrit instead
2016/07/12 15:41:58
Remove the cast to AutofillPaymentInstrument on th
sebsg
2016/07/13 18:49:19
Done.
|
+ .getCardGUID()); |
please use gerrit instead
2016/07/12 15:41:58
getIdentifier()
sebsg
2016/07/13 18:49:19
Done.
|
+ } |
+ |
mClient.onPaymentResponse(response); |
} |