Chromium Code Reviews| Index: components/password_manager/core/browser/password_form_manager.h |
| diff --git a/components/password_manager/core/browser/password_form_manager.h b/components/password_manager/core/browser/password_form_manager.h |
| index 85463da1e38284228c54396c53eb93af737c972c..83849217fe6b3e3c6f6be829d4d34b9fb4174eff 100644 |
| --- a/components/password_manager/core/browser/password_form_manager.h |
| +++ b/components/password_manager/core/browser/password_form_manager.h |
| @@ -145,6 +145,11 @@ class PasswordFormManager : public PasswordStoreConsumer { |
| // TODO: Make this private once we switch to the new UI. |
| void Save(); |
| + // Update the password store entry for |credentials_to_update|, using the |
| + // password from |pending_credentials_|. It modifies |pending_credentials_|. |
| + // |credentials_to_update| should be one of |best_matches_|. |
| + void Update(const autofill::PasswordForm& credentials_to_update); |
| + |
| // Call these if/when we know the form submission worked or failed. |
| // These routines are used to update internal statistics ("ActionsTaken"). |
| void SubmitPassed(); |
| @@ -355,6 +360,13 @@ class PasswordFormManager : public PasswordStoreConsumer { |
| // from password store. |
| void CreatePendingCredentials(); |
| + // For non-empty |password| returns the unique entry in |best_matches_| with |
| + // the same password, if it exists, and nullptr otherwise. For empty |
| + // |password|, if there is just one entry in |best_matches_|, returns that |
| + // entry, otherwise nullptr. |
|
vasilii
2015/08/05 17:34:08
Refresh the comment.
|
| + autofill::PasswordForm* FindBestMatchForUpdatePassword( |
| + const base::string16& password) const; |
| + |
| // Set of PasswordForms from the DB that best match the form |
| // being managed by this. Use a map instead of vector, because we most |
| // frequently require lookups by username value in IsNewLogin. |