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

Unified Diff: chrome/renderer/autofill/password_autofill_manager.cc

Issue 9625026: Save password without an associated username. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 9 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
« no previous file with comments | « chrome/browser/password_manager/password_form_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/autofill/password_autofill_manager.cc
===================================================================
--- chrome/renderer/autofill/password_autofill_manager.cc (revision 125467)
+++ chrome/renderer/autofill/password_autofill_manager.cc (working copy)
@@ -55,6 +55,13 @@
WebKit::WebVector<WebKit::WebNode> temp_elements;
fe->getNamedElements(data.fields[j].name, temp_elements);
+ // It's true if the form hasn't the user_name elemtnt for the password.
+ // In this case, we just skip and continue to autofill,
+ // because we'd like to autofill the password if user_name doesn't exist.
+ if (temp_elements.size() == 0) {
+ continue;
+ }
Ilya Sherman 2012/03/08 23:48:49 This doesn't seem like the right change. We shoul
Yumikiyo Osanai 2012/03/20 15:53:37 Done.
+
// Match the first input element, if any.
// |getNamedElements| may return non-input elements where the names match,
// so the results are filtered for input elements.
@@ -442,7 +449,7 @@
PasswordInfo password_info;
password_info.fill_data = form_data;
password_info.password_field = password_element;
- login_to_password_info_[username_element] = password_info;
+ login_to_password_info_[password_element] = password_info;
}
}
« no previous file with comments | « chrome/browser/password_manager/password_form_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698