diff options
Diffstat (limited to 'chrome/browser/autofill/autofill_cc_infobar_delegate.h')
-rw-r--r-- | chrome/browser/autofill/autofill_cc_infobar_delegate.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/chrome/browser/autofill/autofill_cc_infobar_delegate.h b/chrome/browser/autofill/autofill_cc_infobar_delegate.h index ffd18e8..bf15d39 100644 --- a/chrome/browser/autofill/autofill_cc_infobar_delegate.h +++ b/chrome/browser/autofill/autofill_cc_infobar_delegate.h @@ -24,12 +24,27 @@ struct LoadCommittedDetails; // card information gathered from a form submission. class AutofillCCInfoBarDelegate : public ConfirmInfoBarDelegate { public: + // Creates an autofill credit card delegate and adds it to |infobar_service|. + static void Create(InfoBarService* infobar_service, + const CreditCard* credit_card, + PersonalDataManager* personal_data, + const AutofillMetrics* metric_logger); + +#if defined(UNIT_TEST) + static scoped_ptr<ConfirmInfoBarDelegate> Create( + const CreditCard* credit_card, + PersonalDataManager* personal_data, + const AutofillMetrics* metric_logger) { + return scoped_ptr<ConfirmInfoBarDelegate>(new AutofillCCInfoBarDelegate( + NULL, credit_card, personal_data, metric_logger)); + } +#endif + + private: AutofillCCInfoBarDelegate(InfoBarService* infobar_service, const CreditCard* credit_card, PersonalDataManager* personal_data, const AutofillMetrics* metric_logger); - - private: virtual ~AutofillCCInfoBarDelegate(); void LogUserAction(AutofillMetrics::InfoBarMetric user_action); |