OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PASSWORD_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_ |
6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 // such a late time because this experiment will only affect a small number | 95 // such a late time because this experiment will only affect a small number |
96 // of users so we want to include a larger fraction of these users than the | 96 // of users so we want to include a larger fraction of these users than the |
97 // normal 10%. | 97 // normal 10%. |
98 void PossiblyInitializeUsernamesExperiment( | 98 void PossiblyInitializeUsernamesExperiment( |
99 const content::PasswordFormMap& matches) const; | 99 const content::PasswordFormMap& matches) const; |
100 | 100 |
101 // Returns true if we can show possible usernames to users in cases where | 101 // Returns true if we can show possible usernames to users in cases where |
102 // the username for the form is ambigious. | 102 // the username for the form is ambigious. |
103 bool OtherPossibleUsernamesEnabled() const; | 103 bool OtherPossibleUsernamesEnabled() const; |
104 | 104 |
| 105 // Returns true if we should show an infobar instead of automatically saving |
| 106 // the password, based on inspecting the state of |provisional_save_manager_|. |
| 107 bool ShouldShowSavePasswordInfoBar() const; |
| 108 |
105 // Note about how a PasswordFormManager can transition from | 109 // Note about how a PasswordFormManager can transition from |
106 // pending_login_managers_ to provisional_save_manager_ and the infobar. | 110 // pending_login_managers_ to provisional_save_manager_ and the infobar. |
107 // | 111 // |
108 // 1. form "seen" | 112 // 1. form "seen" |
109 // | new | 113 // | new |
110 // | ___ Infobar | 114 // | ___ Infobar |
111 // pending_login -- form submit --> provisional_save ___/ | 115 // pending_login -- form submit --> provisional_save ___/ |
112 // ^ | \___ (update DB) | 116 // ^ | \___ (update DB) |
113 // | fail | 117 // | fail |
114 // |-----------<------<---------| !new | 118 // |-----------<------<---------| !new |
(...skipping 23 matching lines...) Expand all Loading... |
138 BooleanPrefMember password_manager_enabled_; | 142 BooleanPrefMember password_manager_enabled_; |
139 | 143 |
140 // Observers to be notified of LoginModel events. This is mutable to allow | 144 // Observers to be notified of LoginModel events. This is mutable to allow |
141 // notification in const member functions. | 145 // notification in const member functions. |
142 mutable ObserverList<LoginModelObserver> observers_; | 146 mutable ObserverList<LoginModelObserver> observers_; |
143 | 147 |
144 DISALLOW_COPY_AND_ASSIGN(PasswordManager); | 148 DISALLOW_COPY_AND_ASSIGN(PasswordManager); |
145 }; | 149 }; |
146 | 150 |
147 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_ | 151 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_ |
OLD | NEW |