Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(594)

Unified Diff: components/payments/content/payment_request_state.h

Issue 2807363003: [Payments] After adding/editing a credit card, instrument is selected. (Closed)
Patch Set: include fix Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/payments/content/payment_request_state.h
diff --git a/components/payments/content/payment_request_state.h b/components/payments/content/payment_request_state.h
index f1d067bbeac2251eea2664d19b9d3f572a02b0c1..90b5fde5c6a7422f869ea9ff8e99520c6705a388 100644
--- a/components/payments/content/payment_request_state.h
+++ b/components/payments/content/payment_request_state.h
@@ -16,6 +16,7 @@
namespace autofill {
class AutofillProfile;
+class CreditCard;
class PersonalDataManager;
} // namespace autofill
@@ -111,6 +112,12 @@ class PaymentRequestState : public PaymentInstrument::Delegate {
return available_instruments_;
}
+ // Creates and adds an AutofillPaymentInstrument, which makes a copy of
+ // |card|. |selected| indicates if the newly-created instrument should be
+ // selected, after which observers will be notified.
+ void AddAutofillPaymentInstrument(bool selected,
+ const autofill::CreditCard& card);
+
// Setters to change the selected information. Will have the side effect of
// recomputing "is ready to pay" and notify observers.
void SetSelectedShippingOption(const std::string& shipping_option_id);

Powered by Google App Engine
This is Rietveld 408576698