OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_INFOBAR_DELEGATE_H_ |
6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_INFOBAR_DELEGATE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 #endif | 39 #endif |
40 | 40 |
41 private: | 41 private: |
42 AutofillCCInfoBarDelegate(const AutofillMetrics* metric_logger, | 42 AutofillCCInfoBarDelegate(const AutofillMetrics* metric_logger, |
43 const base::Closure& save_card_callback); | 43 const base::Closure& save_card_callback); |
44 virtual ~AutofillCCInfoBarDelegate(); | 44 virtual ~AutofillCCInfoBarDelegate(); |
45 | 45 |
46 void LogUserAction(AutofillMetrics::InfoBarMetric user_action); | 46 void LogUserAction(AutofillMetrics::InfoBarMetric user_action); |
47 | 47 |
48 // ConfirmInfoBarDelegate: | 48 // ConfirmInfoBarDelegate: |
49 virtual void InfoBarDismissed() OVERRIDE; | 49 virtual void InfoBarDismissed() override; |
50 virtual int GetIconID() const OVERRIDE; | 50 virtual int GetIconID() const override; |
51 virtual Type GetInfoBarType() const OVERRIDE; | 51 virtual Type GetInfoBarType() const override; |
52 virtual bool ShouldExpireInternal( | 52 virtual bool ShouldExpireInternal( |
53 const NavigationDetails& details) const OVERRIDE; | 53 const NavigationDetails& details) const override; |
54 virtual base::string16 GetMessageText() const OVERRIDE; | 54 virtual base::string16 GetMessageText() const override; |
55 virtual base::string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; | 55 virtual base::string16 GetButtonLabel(InfoBarButton button) const override; |
56 virtual bool Accept() OVERRIDE; | 56 virtual bool Accept() override; |
57 virtual bool Cancel() OVERRIDE; | 57 virtual bool Cancel() override; |
58 virtual base::string16 GetLinkText() const OVERRIDE; | 58 virtual base::string16 GetLinkText() const override; |
59 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; | 59 virtual bool LinkClicked(WindowOpenDisposition disposition) override; |
60 | 60 |
61 // For logging UMA metrics. | 61 // For logging UMA metrics. |
62 // Weak reference. Owned by the AutofillManager that initiated this infobar. | 62 // Weak reference. Owned by the AutofillManager that initiated this infobar. |
63 const AutofillMetrics* metric_logger_; | 63 const AutofillMetrics* metric_logger_; |
64 | 64 |
65 // The callback to save credit card if the user accepts the infobar. | 65 // The callback to save credit card if the user accepts the infobar. |
66 base::Closure save_card_callback_; | 66 base::Closure save_card_callback_; |
67 | 67 |
68 // Did the user ever explicitly accept or dismiss this infobar? | 68 // Did the user ever explicitly accept or dismiss this infobar? |
69 bool had_user_interaction_; | 69 bool had_user_interaction_; |
70 | 70 |
71 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, CreditCardInfoBar); | 71 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, CreditCardInfoBar); |
72 | 72 |
73 DISALLOW_COPY_AND_ASSIGN(AutofillCCInfoBarDelegate); | 73 DISALLOW_COPY_AND_ASSIGN(AutofillCCInfoBarDelegate); |
74 }; | 74 }; |
75 | 75 |
76 } // namespace autofill | 76 } // namespace autofill |
77 | 77 |
78 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_INFOBAR_DELEGATE_H_ | 78 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_INFOBAR_DELEGATE_H_ |
OLD | NEW |