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

Unified Diff: components/autofill/content/renderer/password_autofill_agent.h

Issue 492043003: Fill on account select in the password manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes from gcasto Created 6 years, 3 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/autofill/content/renderer/password_autofill_agent.h
diff --git a/components/autofill/content/renderer/password_autofill_agent.h b/components/autofill/content/renderer/password_autofill_agent.h
index b6ab805249072b320e82ee9c9fa01dbc0b81acc1..abbb4fc9fc180f3688051ad67f0a3ef3cedf8e6d 100644
--- a/components/autofill/content/renderer/password_autofill_agent.h
+++ b/components/autofill/content/renderer/password_autofill_agent.h
@@ -90,6 +90,12 @@ class PasswordAutofillAgent : public content::RenderViewObserver {
RESTRICTION_NON_EMPTY_PASSWORD
};
+ enum FillUserNameAndPasswordOptions {
+ EXACT_USERNAME_MATCH = 1 << 0,
+ SET_SELECTION = 1 << 1,
+ FILL_PREFERRED_USERNAME = 1 << 2
+ };
+
struct PasswordInfo {
blink::WebInputElement password_field;
PasswordFormFillData fill_data;
@@ -170,15 +176,16 @@ class PasswordAutofillAgent : public content::RenderViewObserver {
// unless the |username_element| already has a value set. In that case,
// attempts to fill the password matching the already filled username, if
// such a password exists.
- void FillFormOnPasswordRecieved(const PasswordFormFillData& fill_data,
+ void FillFormOnPasswordReceived(const PasswordFormFillData& fill_data,
blink::WebInputElement username_element,
blink::WebInputElement password_element);
+ // options_mask should be a bitwise mask of FillUserNameAndPasswordOptions
+ // values.
bool FillUserNameAndPassword(blink::WebInputElement* username_element,
blink::WebInputElement* password_element,
const PasswordFormFillData& fill_data,
- bool exact_username_match,
- bool set_selection);
+ const int options_mask);
// Fills |login_input| and |password| with the most relevant suggestion from
// |fill_data| and shows a popup with other suggestions.

Powered by Google App Engine
This is Rietveld 408576698