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

Unified Diff: components/autofill/core/browser/autofill_manager.cc

Issue 2796873002: Sending autofill types for username fields in sign-in forms for improving username detection. (Closed)
Patch Set: update comments Created 3 years, 8 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/core/browser/autofill_manager.cc
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
index d599bce07603f84b97bd881bbe88c249078ea123..ecd58bd3ecf1e40d1f51ef37fd7926534bf7675b 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -2007,6 +2007,11 @@ void AutofillManager::DeterminePossibleFieldTypesForUpload(
// profile or credit card, identify any stored types that match the value.
for (size_t i = 0; i < submitted_form->field_count(); ++i) {
AutofillField* field = submitted_form->field(i);
+ if (!field->possible_types().empty()) {
+ // If this is an upload for password form submission, Password Manager
+ // could already set types for some fields.
Roger McFarlane (Chromium) 2017/04/04 19:09:42 The goal of this function is to include all of the
dvadym 2017/04/05 13:28:28 Good point. I thought, when I was writing this cod
+ continue;
+ }
ServerFieldTypeSet matching_types;
base::string16 value;
« no previous file with comments | « no previous file | components/autofill/core/browser/form_structure.h » ('j') | components/autofill/core/browser/form_structure.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698