| 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_FORM_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_FORM_MANAGER_H_ |
| 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_FORM_MANAGER_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_FORM_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 } | 145 } |
| 146 | 146 |
| 147 // Returns the realm URL for the form managed my this manager. | 147 // Returns the realm URL for the form managed my this manager. |
| 148 const std::string& realm() const { | 148 const std::string& realm() const { |
| 149 return pending_credentials_.signon_realm; | 149 return pending_credentials_.signon_realm; |
| 150 } | 150 } |
| 151 | 151 |
| 152 private: | 152 private: |
| 153 friend class PasswordFormManagerTest; | 153 friend class PasswordFormManagerTest; |
| 154 | 154 |
| 155 // ManagerAction - What does the manager do with this form? Either it | 155 // ManagerAction - What does the manager do with this form? Either it fills |
| 156 // fills it, or it doesn't. If it doesn't fill it, that's either | 156 // it, or it doesn't. If it doesn't fill it, that's either because it has no |
| 157 // because it has no match, or it is blacklisted, or it is disabled | 157 // match or it is blacklisted. Note that if we don't have an exact match, we |
| 158 // via the AUTOCOMPLETE=off attribute. Note that if we don't have | 158 // still provide candidates that the user may end up choosing. |
| 159 // an exact match, we still provide candidates that the user may | |
| 160 // end up choosing. | |
| 161 enum ManagerAction { | 159 enum ManagerAction { |
| 162 kManagerActionNone = 0, | 160 kManagerActionNone = 0, |
| 163 kManagerActionAutofilled, | 161 kManagerActionAutofilled, |
| 164 kManagerActionBlacklisted, | 162 kManagerActionBlacklisted, |
| 165 kManagerActionDisabled, | |
| 166 kManagerActionMax | 163 kManagerActionMax |
| 167 }; | 164 }; |
| 168 | 165 |
| 169 // UserAction - What does the user do with this form? If he or she | 166 // UserAction - What does the user do with this form? If he or she |
| 170 // does nothing (either by accepting what the password manager did, or | 167 // does nothing (either by accepting what the password manager did, or |
| 171 // by simply (not typing anything at all), you get None. If there were | 168 // by simply (not typing anything at all), you get None. If there were |
| 172 // multiple choices and the user selects one other than the default, | 169 // multiple choices and the user selects one other than the default, |
| 173 // you get Choose, if user selects an entry from matching against the Public | 170 // you get Choose, if user selects an entry from matching against the Public |
| 174 // Suffix List you get ChoosePslMatch, and if the user types in a new value, | 171 // Suffix List you get ChoosePslMatch, and if the user types in a new value, |
| 175 // you get Override. | 172 // you get Override. |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 // These three fields record the "ActionsTaken" by the browser and | 305 // These three fields record the "ActionsTaken" by the browser and |
| 309 // the user with this form, and the result. They are combined and | 306 // the user with this form, and the result. They are combined and |
| 310 // recorded in UMA when the manager is destroyed. | 307 // recorded in UMA when the manager is destroyed. |
| 311 ManagerAction manager_action_; | 308 ManagerAction manager_action_; |
| 312 UserAction user_action_; | 309 UserAction user_action_; |
| 313 SubmitResult submit_result_; | 310 SubmitResult submit_result_; |
| 314 | 311 |
| 315 DISALLOW_COPY_AND_ASSIGN(PasswordFormManager); | 312 DISALLOW_COPY_AND_ASSIGN(PasswordFormManager); |
| 316 }; | 313 }; |
| 317 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_FORM_MANAGER_H_ | 314 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_FORM_MANAGER_H_ |
| OLD | NEW |