| 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 // against the observed_form_. | 210 // against the observed_form_. |
| 211 int ScoreResult(const autofill::PasswordForm& form) const; | 211 int ScoreResult(const autofill::PasswordForm& form) const; |
| 212 | 212 |
| 213 // Helper for Save in the case that best_matches.size() > 0, meaning | 213 // Helper for Save in the case that best_matches.size() > 0, meaning |
| 214 // we have at least one match for this form/username/password. This | 214 // we have at least one match for this form/username/password. This |
| 215 // Updates the form managed by this object, as well as any matching forms | 215 // Updates the form managed by this object, as well as any matching forms |
| 216 // that now need to have preferred bit changed, since updated_credentials | 216 // that now need to have preferred bit changed, since updated_credentials |
| 217 // is now implicitly 'preferred'. | 217 // is now implicitly 'preferred'. |
| 218 void UpdateLogin(); | 218 void UpdateLogin(); |
| 219 | 219 |
| 220 // Check to see if |pending| corresponds to an account creation form. If we |
| 221 // think that it does, we label it as such and upload this state to the |
| 222 // Autofill server, so that we will trigger password generation in the future. |
| 223 void CheckForAccountCreationForm(const autofill::PasswordForm& pending, |
| 224 const autofill::PasswordForm& observed); |
| 225 |
| 220 // Update all login matches to reflect new preferred state - preferred flag | 226 // Update all login matches to reflect new preferred state - preferred flag |
| 221 // will be reset on all matched logins that different than the current | 227 // will be reset on all matched logins that different than the current |
| 222 // |pending_credentials_|. | 228 // |pending_credentials_|. |
| 223 void UpdatePreferredLoginState(PasswordStore* password_store); | 229 void UpdatePreferredLoginState(PasswordStore* password_store); |
| 224 | 230 |
| 225 // Returns true if |username| is one of the other possible usernames for a | 231 // Returns true if |username| is one of the other possible usernames for a |
| 226 // password form in |best_matches_| and sets |pending_credentials_| to the | 232 // password form in |best_matches_| and sets |pending_credentials_| to the |
| 227 // match which had this username. | 233 // match which had this username. |
| 228 bool UpdatePendingCredentialsIfOtherPossibleUsername( | 234 bool UpdatePendingCredentialsIfOtherPossibleUsername( |
| 229 const string16& username); | 235 const string16& username); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 UserAction user_action_; | 314 UserAction user_action_; |
| 309 SubmitResult submit_result_; | 315 SubmitResult submit_result_; |
| 310 | 316 |
| 311 // Whether we should save, blacklist, or do nothing with this form's login | 317 // Whether we should save, blacklist, or do nothing with this form's login |
| 312 // on the next navigation or when the tab is closed. | 318 // on the next navigation or when the tab is closed. |
| 313 PasswordAction password_action_; | 319 PasswordAction password_action_; |
| 314 | 320 |
| 315 DISALLOW_COPY_AND_ASSIGN(PasswordFormManager); | 321 DISALLOW_COPY_AND_ASSIGN(PasswordFormManager); |
| 316 }; | 322 }; |
| 317 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_FORM_MANAGER_H_ | 323 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_FORM_MANAGER_H_ |
| OLD | NEW |