Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(951)

Unified Diff: components/password_manager/core/browser/password_autofill_manager.h

Issue 208453002: Add "previewing on hover" support for password field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improve rebased code. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698