| Index: components/payments/content/payment_request_state.cc
|
| diff --git a/components/payments/content/payment_request_state.cc b/components/payments/content/payment_request_state.cc
|
| index dac01e502e008834766e507a7e9e6347f52ff3b6..d2e9a98f50cf465dfffc70b7bd0fe09100f6c8a8 100644
|
| --- a/components/payments/content/payment_request_state.cc
|
| +++ b/components/payments/content/payment_request_state.cc
|
| @@ -106,6 +106,27 @@ void PaymentRequestState::GeneratePaymentResponse() {
|
| selected_shipping_profile_, selected_contact_profile_, this);
|
| }
|
|
|
| +void PaymentRequestState::RecordUseStats() {
|
| + if (spec_->request_shipping()) {
|
| + DCHECK(selected_shipping_profile_);
|
| + personal_data_manager_->RecordUseOf(*selected_shipping_profile_);
|
| + }
|
| +
|
| + if (spec_->request_payer_name() || spec_->request_payer_email() ||
|
| + spec_->request_payer_phone()) {
|
| + DCHECK(selected_contact_profile_);
|
| +
|
| + // If the same address was used for both contact and shipping, the stats
|
| + // should only be updated once.
|
| + if (!spec_->request_shipping() || (selected_shipping_profile_->guid() !=
|
| + selected_contact_profile_->guid())) {
|
| + personal_data_manager_->RecordUseOf(*selected_contact_profile_);
|
| + }
|
| + }
|
| +
|
| + selected_instrument_->RecordUse();
|
| +}
|
| +
|
| void PaymentRequestState::AddAutofillPaymentInstrument(
|
| bool selected,
|
| const autofill::CreditCard& card) {
|
|
|