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

Unified Diff: chrome/browser/autofill/autofill_cc_infobar_delegate.h

Issue 11644059: Change infobar creation to use a public static Create() method on the infobar delegate classes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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: chrome/browser/autofill/autofill_cc_infobar_delegate.h
===================================================================
--- chrome/browser/autofill/autofill_cc_infobar_delegate.h (revision 175396)
+++ chrome/browser/autofill/autofill_cc_infobar_delegate.h (working copy)
@@ -24,12 +24,27 @@
// 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);
« no previous file with comments | « chrome/browser/api/infobars/simple_alert_infobar_delegate.cc ('k') | chrome/browser/autofill/autofill_cc_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698