OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_H_ |
6 #define CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 scoped_ptr<password_manager::PasswordFormManager> form_to_save, | 37 scoped_ptr<password_manager::PasswordFormManager> form_to_save, |
38 const std::string& uma_histogram_suffix); | 38 const std::string& uma_histogram_suffix); |
39 | 39 |
40 private: | 40 private: |
41 SavePasswordInfoBarDelegate( | 41 SavePasswordInfoBarDelegate( |
42 scoped_ptr<password_manager::PasswordFormManager> form_to_save, | 42 scoped_ptr<password_manager::PasswordFormManager> form_to_save, |
43 const std::string& uma_histogram_suffix); | 43 const std::string& uma_histogram_suffix); |
44 | 44 |
45 ~SavePasswordInfoBarDelegate() override; | 45 ~SavePasswordInfoBarDelegate() override; |
46 | 46 |
47 // InfoBarDelegate | 47 // ConfirmInfoBarDelegate: |
| 48 Type GetInfoBarType() const override; |
| 49 InfoBarAutomationType GetInfoBarAutomationType() const override; |
| 50 int GetIconID() const override; |
48 bool ShouldExpire(const NavigationDetails& details) const override; | 51 bool ShouldExpire(const NavigationDetails& details) const override; |
49 | 52 void InfoBarDismissed() override; |
50 // ConfirmInfoBarDelegate | |
51 int GetIconID() const override; | |
52 Type GetInfoBarType() const override; | |
53 base::string16 GetMessageText() const override; | 53 base::string16 GetMessageText() const override; |
54 base::string16 GetButtonLabel(InfoBarButton button) const override; | 54 base::string16 GetButtonLabel(InfoBarButton button) const override; |
55 bool Accept() override; | 55 bool Accept() override; |
56 bool Cancel() override; | 56 bool Cancel() override; |
57 void InfoBarDismissed() override; | |
58 | |
59 InfoBarAutomationType GetInfoBarAutomationType() const override; | |
60 | 57 |
61 // The PasswordFormManager managing the form we're asking the user about, | 58 // The PasswordFormManager managing the form we're asking the user about, |
62 // and should update as per her decision. | 59 // and should update as per her decision. |
63 scoped_ptr<password_manager::PasswordFormManager> form_to_save_; | 60 scoped_ptr<password_manager::PasswordFormManager> form_to_save_; |
64 | 61 |
65 // Used to track the results we get from the info bar. | 62 // Used to track the results we get from the info bar. |
66 password_manager::metrics_util::ResponseType infobar_response_; | 63 password_manager::metrics_util::ResponseType infobar_response_; |
67 | 64 |
68 // Measures the "Save password?" prompt lifetime. Used to report an UMA | 65 // Measures the "Save password?" prompt lifetime. Used to report an UMA |
69 // signal. | 66 // signal. |
70 base::ElapsedTimer timer_; | 67 base::ElapsedTimer timer_; |
71 | 68 |
72 // The group name corresponding to the domain name of |form_to_save_| if the | 69 // The group name corresponding to the domain name of |form_to_save_| if the |
73 // form is on a monitored domain. Otherwise, an empty string. | 70 // form is on a monitored domain. Otherwise, an empty string. |
74 const std::string uma_histogram_suffix_; | 71 const std::string uma_histogram_suffix_; |
75 | 72 |
76 DISALLOW_COPY_AND_ASSIGN(SavePasswordInfoBarDelegate); | 73 DISALLOW_COPY_AND_ASSIGN(SavePasswordInfoBarDelegate); |
77 }; | 74 }; |
78 | 75 |
79 #endif // CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_H_ | 76 #endif // CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_H_ |
OLD | NEW |