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

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: Nit again Created 4 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 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/callback.h" 8 #include "base/callback.h"
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 30 matching lines...) Expand all
41 41
42 private: 42 private:
43 AutofillCCInfoBarDelegate(bool upload, 43 AutofillCCInfoBarDelegate(bool upload,
44 const base::Closure& save_card_callback); 44 const base::Closure& save_card_callback);
45 ~AutofillCCInfoBarDelegate() override; 45 ~AutofillCCInfoBarDelegate() override;
46 46
47 void LogUserAction(AutofillMetrics::InfoBarMetric user_action); 47 void LogUserAction(AutofillMetrics::InfoBarMetric user_action);
48 48
49 // ConfirmInfoBarDelegate: 49 // ConfirmInfoBarDelegate:
50 Type GetInfoBarType() const override; 50 Type GetInfoBarType() const override;
51 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
51 int GetIconId() const override; 52 int GetIconId() const override;
52 gfx::VectorIconId GetVectorIconId() const override; 53 gfx::VectorIconId GetVectorIconId() const override;
53 bool ShouldExpire(const NavigationDetails& details) const override; 54 bool ShouldExpire(const NavigationDetails& details) const override;
54 void InfoBarDismissed() override; 55 void InfoBarDismissed() override;
55 base::string16 GetMessageText() const override; 56 base::string16 GetMessageText() const override;
56 base::string16 GetButtonLabel(InfoBarButton button) const override; 57 base::string16 GetButtonLabel(InfoBarButton button) const override;
57 bool Accept() override; 58 bool Accept() override;
58 bool Cancel() override; 59 bool Cancel() override;
59 base::string16 GetLinkText() const override; 60 base::string16 GetLinkText() const override;
60 GURL GetLinkURL() const override; 61 GURL GetLinkURL() const override;
61 62
62 bool upload_; 63 bool upload_;
63 64
64 // 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.
65 base::Closure save_card_callback_; 66 base::Closure save_card_callback_;
66 67
67 // Did the user ever explicitly accept or dismiss this infobar? 68 // Did the user ever explicitly accept or dismiss this infobar?
68 bool had_user_interaction_; 69 bool had_user_interaction_;
69 70
70 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, CreditCardInfoBar); 71 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, CreditCardInfoBar);
71 72
72 DISALLOW_COPY_AND_ASSIGN(AutofillCCInfoBarDelegate); 73 DISALLOW_COPY_AND_ASSIGN(AutofillCCInfoBarDelegate);
73 }; 74 };
74 75
75 } // namespace autofill 76 } // namespace autofill
76 77
77 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CC_INFOBAR_DELEGATE_H_ 78 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CC_INFOBAR_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698