| 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 24 matching lines...) Expand all Loading... |
| 35 static void Create( | 35 static void Create( |
| 36 content::WebContents* web_contents, | 36 content::WebContents* web_contents, |
| 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 virtual ~SavePasswordInfoBarDelegate(); | 45 ~SavePasswordInfoBarDelegate() override; |
| 46 | 46 |
| 47 // InfoBarDelegate | 47 // InfoBarDelegate |
| 48 virtual bool ShouldExpire(const NavigationDetails& details) const override; | 48 bool ShouldExpire(const NavigationDetails& details) const override; |
| 49 | 49 |
| 50 // ConfirmInfoBarDelegate | 50 // ConfirmInfoBarDelegate |
| 51 virtual int GetIconID() const override; | 51 int GetIconID() const override; |
| 52 virtual Type GetInfoBarType() const override; | 52 Type GetInfoBarType() const override; |
| 53 virtual base::string16 GetMessageText() const override; | 53 base::string16 GetMessageText() const override; |
| 54 virtual base::string16 GetButtonLabel(InfoBarButton button) const override; | 54 base::string16 GetButtonLabel(InfoBarButton button) const override; |
| 55 virtual bool Accept() override; | 55 bool Accept() override; |
| 56 virtual bool Cancel() override; | 56 bool Cancel() override; |
| 57 virtual void InfoBarDismissed() override; | 57 void InfoBarDismissed() override; |
| 58 | 58 |
| 59 virtual InfoBarAutomationType GetInfoBarAutomationType() const override; | 59 InfoBarAutomationType GetInfoBarAutomationType() const override; |
| 60 | 60 |
| 61 // The PasswordFormManager managing the form we're asking the user about, | 61 // The PasswordFormManager managing the form we're asking the user about, |
| 62 // and should update as per her decision. | 62 // and should update as per her decision. |
| 63 scoped_ptr<password_manager::PasswordFormManager> form_to_save_; | 63 scoped_ptr<password_manager::PasswordFormManager> form_to_save_; |
| 64 | 64 |
| 65 // Used to track the results we get from the info bar. | 65 // Used to track the results we get from the info bar. |
| 66 password_manager::metrics_util::ResponseType infobar_response_; | 66 password_manager::metrics_util::ResponseType infobar_response_; |
| 67 | 67 |
| 68 // Measures the "Save password?" prompt lifetime. Used to report an UMA | 68 // Measures the "Save password?" prompt lifetime. Used to report an UMA |
| 69 // signal. | 69 // signal. |
| 70 base::ElapsedTimer timer_; | 70 base::ElapsedTimer timer_; |
| 71 | 71 |
| 72 // The group name corresponding to the domain name of |form_to_save_| if the | 72 // 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. | 73 // form is on a monitored domain. Otherwise, an empty string. |
| 74 const std::string uma_histogram_suffix_; | 74 const std::string uma_histogram_suffix_; |
| 75 | 75 |
| 76 DISALLOW_COPY_AND_ASSIGN(SavePasswordInfoBarDelegate); | 76 DISALLOW_COPY_AND_ASSIGN(SavePasswordInfoBarDelegate); |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 #endif // CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_H_ | 79 #endif // CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_H_ |
| OLD | NEW |