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

Side by Side Diff: components/autofill/core/browser/autofill_cc_infobar_delegate.h

Issue 1520543004: Add method for identifying different InfoBars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing Created 5 years 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 unified diff | Download patch
OLDNEW
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 COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CC_INFOBAR_DELEGATE_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CC_INFOBAR_DELEGATE_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CC_INFOBAR_DELEGATE_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 private: 44 private:
45 AutofillCCInfoBarDelegate(AutofillClient* autofill_client, 45 AutofillCCInfoBarDelegate(AutofillClient* autofill_client,
46 const base::Closure& save_card_callback); 46 const base::Closure& save_card_callback);
47 ~AutofillCCInfoBarDelegate() override; 47 ~AutofillCCInfoBarDelegate() override;
48 48
49 void LogUserAction(AutofillMetrics::InfoBarMetric user_action); 49 void LogUserAction(AutofillMetrics::InfoBarMetric user_action);
50 50
51 // ConfirmInfoBarDelegate: 51 // ConfirmInfoBarDelegate:
52 Type GetInfoBarType() const override; 52 Type GetInfoBarType() const override;
53 std::string GetIdentifier() const override;
53 int GetIconId() const override; 54 int GetIconId() const override;
54 gfx::VectorIconId GetVectorIconId() const override; 55 gfx::VectorIconId GetVectorIconId() const override;
55 bool ShouldExpire(const NavigationDetails& details) const override; 56 bool ShouldExpire(const NavigationDetails& details) const override;
56 void InfoBarDismissed() override; 57 void InfoBarDismissed() override;
57 base::string16 GetMessageText() const override; 58 base::string16 GetMessageText() const override;
58 base::string16 GetButtonLabel(InfoBarButton button) const override; 59 base::string16 GetButtonLabel(InfoBarButton button) const override;
59 bool Accept() override; 60 bool Accept() override;
60 bool Cancel() override; 61 bool Cancel() override;
61 base::string16 GetLinkText() const override; 62 base::string16 GetLinkText() const override;
62 GURL GetLinkURL() const override; 63 GURL GetLinkURL() const override;
63 64
64 // Performs navigation to handle any link click. Guaranteed to outlive us. 65 // Performs navigation to handle any link click. Guaranteed to outlive us.
65 AutofillClient* const autofill_client_; 66 AutofillClient* const autofill_client_;
66 67
67 // The callback to save credit card if the user accepts the infobar. 68 // The callback to save credit card if the user accepts the infobar.
68 base::Closure save_card_callback_; 69 base::Closure save_card_callback_;
69 70
70 // Did the user ever explicitly accept or dismiss this infobar? 71 // Did the user ever explicitly accept or dismiss this infobar?
71 bool had_user_interaction_; 72 bool had_user_interaction_;
72 73
73 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, CreditCardInfoBar); 74 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, CreditCardInfoBar);
74 75
75 DISALLOW_COPY_AND_ASSIGN(AutofillCCInfoBarDelegate); 76 DISALLOW_COPY_AND_ASSIGN(AutofillCCInfoBarDelegate);
76 }; 77 };
77 78
78 } // namespace autofill 79 } // namespace autofill
79 80
80 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CC_INFOBAR_DELEGATE_H_ 81 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CC_INFOBAR_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698