Chromium Code Reviews| Index: components/password_manager/core/browser/password_autofill_manager.h |
| diff --git a/components/password_manager/core/browser/password_autofill_manager.h b/components/password_manager/core/browser/password_autofill_manager.h |
| index e3f714108ebce4b32fac60b8a8ca85e2af9e0b2f..f72720ee167f17c0abd5b0469e0251472761b713 100644 |
| --- a/components/password_manager/core/browser/password_autofill_manager.h |
| +++ b/components/password_manager/core/browser/password_autofill_manager.h |
| @@ -59,6 +59,10 @@ class PasswordAutofillManager : public autofill::AutofillPopupDelegate { |
| bool AcceptSuggestionForTest(const autofill::FormFieldData& field, |
| const base::string16& username); |
| + // A public version of SelectSuggestion(), only for use in tests. |
| + bool SelectSuggestionForTest(const autofill::FormFieldData& field, |
| + const base::string16& username); |
| + |
| private: |
| typedef std::map<autofill::FormFieldData, autofill::PasswordFormFillData> |
| LoginToPasswordInfoMap; |
| @@ -68,6 +72,11 @@ class PasswordAutofillManager : public autofill::AutofillPopupDelegate { |
| bool AcceptSuggestion(const autofill::FormFieldData& field, |
| const base::string16& username); |
| + // Attempts to preview the password associated with user name |username|, and |
| + // returns true if it was successful. |
| + bool SelectSuggestion(const autofill::FormFieldData& field, |
| + const base::string16& username); |
|
Ilya Sherman
2014/05/13 00:44:05
nit: Let's name these methods "FillSuggestion" and
ziran.sun
2014/05/14 15:35:12
Done.
|
| + |
| // If |current_username| matches a username for one of the login mappings in |
| // |fill_data|, returns true and assigns the password to |out_password|. |
| // Otherwise, returns false and leaves |out_password| untouched. |