| 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/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/timer/elapsed_timer.h" | 10 #include "base/timer/elapsed_timer.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 scoped_ptr<password_manager::PasswordFormManager> form_to_save, | 55 scoped_ptr<password_manager::PasswordFormManager> form_to_save, |
| 56 bool is_smartlock_branding_enabled, | 56 bool is_smartlock_branding_enabled, |
| 57 bool should_show_first_run_experience); | 57 bool should_show_first_run_experience); |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 // The PasswordFormManager managing the form we're asking the user about, | 60 // The PasswordFormManager managing the form we're asking the user about, |
| 61 // and should update as per her decision. | 61 // and should update as per her decision. |
| 62 scoped_ptr<password_manager::PasswordFormManager> form_to_save_; | 62 scoped_ptr<password_manager::PasswordFormManager> form_to_save_; |
| 63 | 63 |
| 64 // Used to track the results we get from the info bar. | 64 // Used to track the results we get from the info bar. |
| 65 password_manager::metrics_util::ResponseType infobar_response_; | 65 password_manager::metrics_util::UIDismissalReason infobar_response_; |
| 66 | 66 |
| 67 // Measures the "Save password?" prompt lifetime. Used to report an UMA | 67 // Measures the "Save password?" prompt lifetime. Used to report an UMA |
| 68 // signal. | 68 // signal. |
| 69 base::ElapsedTimer timer_; | 69 base::ElapsedTimer timer_; |
| 70 | 70 |
| 71 // Records source from where infobar was triggered. | 71 // Records source from where infobar was triggered. |
| 72 // Infobar appearance (message, buttons) depends on value of this parameter. | 72 // Infobar appearance (message, buttons) depends on value of this parameter. |
| 73 password_manager::CredentialSourceType source_type_; | 73 password_manager::CredentialSourceType source_type_; |
| 74 | 74 |
| 75 bool should_show_first_run_experience_; | 75 bool should_show_first_run_experience_; |
| 76 | 76 |
| 77 content::WebContents* web_contents_; | 77 content::WebContents* web_contents_; |
| 78 | 78 |
| 79 DISALLOW_COPY_AND_ASSIGN(SavePasswordInfoBarDelegate); | 79 DISALLOW_COPY_AND_ASSIGN(SavePasswordInfoBarDelegate); |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 // Creates the platform-specific SavePassword InfoBar. This function is defined | 82 // Creates the platform-specific SavePassword InfoBar. This function is defined |
| 83 // in platform-specific .cc (or .mm) files. | 83 // in platform-specific .cc (or .mm) files. |
| 84 scoped_ptr<infobars::InfoBar> CreateSavePasswordInfoBar( | 84 scoped_ptr<infobars::InfoBar> CreateSavePasswordInfoBar( |
| 85 scoped_ptr<SavePasswordInfoBarDelegate> delegate); | 85 scoped_ptr<SavePasswordInfoBarDelegate> delegate); |
| 86 | 86 |
| 87 #endif // CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_H_ | 87 #endif // CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_H_ |
| OLD | NEW |