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

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

Issue 1142153002: Simplify infobar expiry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android compile Created 5 years, 7 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/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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 int GetIconID() const override; 53 int GetIconID() const override;
54 bool ShouldExpire(const NavigationDetails& details) const override;
54 void InfoBarDismissed() override; 55 void InfoBarDismissed() override;
55 bool ShouldExpireInternal(const NavigationDetails& details) const override;
56 base::string16 GetMessageText() const override; 56 base::string16 GetMessageText() const override;
57 base::string16 GetButtonLabel(InfoBarButton button) const override; 57 base::string16 GetButtonLabel(InfoBarButton button) const override;
58 bool Accept() override; 58 bool Accept() override;
59 bool Cancel() override; 59 bool Cancel() override;
60 base::string16 GetLinkText() const override; 60 base::string16 GetLinkText() const override;
61 bool LinkClicked(WindowOpenDisposition disposition) override; 61 bool LinkClicked(WindowOpenDisposition disposition) override;
62 62
63 // Performs navigation to handle any link click. Guaranteed to outlive us. 63 // Performs navigation to handle any link click. Guaranteed to outlive us.
64 AutofillClient* const autofill_client_; 64 AutofillClient* const autofill_client_;
65 65
66 // The callback to save credit card if the user accepts the infobar. 66 // The callback to save credit card if the user accepts the infobar.
67 base::Closure save_card_callback_; 67 base::Closure save_card_callback_;
68 68
69 // Did the user ever explicitly accept or dismiss this infobar? 69 // Did the user ever explicitly accept or dismiss this infobar?
70 bool had_user_interaction_; 70 bool had_user_interaction_;
71 71
72 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, CreditCardInfoBar); 72 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, CreditCardInfoBar);
73 73
74 DISALLOW_COPY_AND_ASSIGN(AutofillCCInfoBarDelegate); 74 DISALLOW_COPY_AND_ASSIGN(AutofillCCInfoBarDelegate);
75 }; 75 };
76 76
77 } // namespace autofill 77 } // namespace autofill
78 78
79 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CC_INFOBAR_DELEGATE_H_ 79 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CC_INFOBAR_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698