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

Unified Diff: components/autofill/content/renderer/password_form_conversion_utils.cc

Issue 372683003: Clean up PasswordFormConversionUtilsTest and add some missing tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 5 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 | « no previous file | components/autofill/content/renderer/password_form_conversion_utils_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/content/renderer/password_form_conversion_utils.cc
diff --git a/components/autofill/content/renderer/password_form_conversion_utils.cc b/components/autofill/content/renderer/password_form_conversion_utils.cc
index 6b4b7807b26aa7a6b9d5ef2d7826270dfd8e93c7..538b602ba21eb6ef48a1e916c0e9d55b6b4c72a8 100644
--- a/components/autofill/content/renderer/password_form_conversion_utils.cc
+++ b/components/autofill/content/renderer/password_form_conversion_utils.cc
@@ -22,10 +22,6 @@ using blink::WebVector;
namespace autofill {
namespace {
-// Maximum number of password fields we will observe before throwing our
-// hands in the air and giving up with a given form.
-static const size_t kMaxPasswords = 3;
-
// Checks in a case-insensitive way if the autocomplete attribute for the given
// |element| is present and has the specified |value_in_lowercase|.
bool HasAutocompleteAttributeValue(const WebInputElement& element,
@@ -132,8 +128,7 @@ void GetPasswordForm(const WebFormElement& form, PasswordForm* password_form) {
if (!input_element || !input_element->isEnabled())
continue;
- if ((passwords.size() < kMaxPasswords) &&
- input_element->isPasswordField()) {
+ if (input_element->isPasswordField()) {
passwords.push_back(*input_element);
// If we have not yet considered any element to be the username so far,
// provisionally select the input element just before the first password
« no previous file with comments | « no previous file | components/autofill/content/renderer/password_form_conversion_utils_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698