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

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: Created 6 years, 4 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 b5fc205a04f729538bef11bfaf94368f76ee5078..e12ab2258c59438771ab9d0fab5f7d808c67a250 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,11 +176,12 @@ class PasswordAutofillAgent : public content::RenderViewObserver {
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