| 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 2d7768295648c8e79b77eaccb767030fdeec287e..5628fadf082bc092d1a9dd21c379a2b2d38253bf 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(
|
|
|