Chromium Code Reviews| 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 e7a1126947e5977122ae45dcc81f399e8a093ff9..d70f03648607905484643c4d26f40d742def6afb 100644 |
| --- a/components/autofill/content/renderer/password_autofill_agent.h |
| +++ b/components/autofill/content/renderer/password_autofill_agent.h |
| @@ -6,6 +6,7 @@ |
| #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ |
| #include <map> |
| +#include <set> |
| #include <vector> |
| #include "base/memory/linked_ptr.h" |
| @@ -91,6 +92,7 @@ class PasswordAutofillAgent : public content::RenderViewObserver { |
| PasswordInfo() : backspace_pressed_last(false) {} |
| }; |
| typedef std::map<blink::WebElement, PasswordInfo> LoginToPasswordInfoMap; |
| + typedef std::map<blink::WebElement, blink::WebElement> PasswordToLoginMap; |
| typedef std::map<blink::WebFrame*, |
| linked_ptr<PasswordForm> > FrameToPasswordFormMap; |
| @@ -198,6 +200,7 @@ class PasswordAutofillAgent : public content::RenderViewObserver { |
| // The logins we have filled so far with their associated info. |
| LoginToPasswordInfoMap login_to_password_info_; |
| + PasswordToLoginMap password_to_username_; |
| // Used for UMA stats. |
| OtherPossibleUsernamesUsage usernames_usage_; |
| @@ -226,6 +229,12 @@ class PasswordAutofillAgent : public content::RenderViewObserver { |
| // True indicates that all frames in a page have been rendered. |
| bool did_stop_loading_; |
| + // The set of all username elements, for which the corresponding password |
|
engedy
2014/07/29 14:43:54
As discussed offline, we should just add this to P
vabr (Chromium)
2014/07/29 15:12:30
Done.
|
| + // fields should not be filled at the moment. This includes cases, where the |
| + // user chose a suggestion, then changed the filled password, then entered and |
| + // left the username field again without change. |
| + std::set<blink::WebElement> temporary_disabled_password_fill_; |
| + |
| base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_; |
| DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); |