| 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 236650e361dd7774208fa66bf9d20edd0fa2d96a..7df03ef0968856397689f232d4a47e5a5321d0c9 100644
|
| --- a/components/payments/content/payment_request_state.cc
|
| +++ b/components/payments/content/payment_request_state.cc
|
| @@ -105,6 +105,20 @@ void PaymentRequestState::AddAutofillPaymentInstrument(
|
| SetSelectedInstrument(available_instruments_.back().get());
|
| }
|
|
|
| +void PaymentRequestState::AddAutofillShippingProfile(
|
| + bool selected,
|
| + const autofill::AutofillProfile& profile) {
|
| + profile_cache_.push_back(
|
| + base::MakeUnique<autofill::AutofillProfile>(profile));
|
| + // TODO(tmartino): Implement deduplication rules specific to shipping
|
| + // profiles.
|
| + autofill::AutofillProfile* new_cached_profile = profile_cache_.back().get();
|
| + shipping_profiles_.push_back(new_cached_profile);
|
| +
|
| + if (selected)
|
| + SetSelectedShippingProfile(new_cached_profile);
|
| +}
|
| +
|
| void PaymentRequestState::SetSelectedShippingOption(
|
| const std::string& shipping_option_id) {
|
| spec_->StartWaitingForUpdateWith(
|
|
|