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

Unified Diff: components/autofill/core/browser/form_structure.h

Issue 659793005: [Password Generation] Always query password forms via Autofill (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Done Created 6 years, 2 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/form_structure.h
diff --git a/components/autofill/core/browser/form_structure.h b/components/autofill/core/browser/form_structure.h
index cead91f3b615310fd28f8b11d74af650ef95de92..d2bdb7ecc16628a68031bb795f189fd020331ae4 100644
--- a/components/autofill/core/browser/form_structure.h
+++ b/components/autofill/core/browser/form_structure.h
@@ -105,7 +105,11 @@ class FormStructure {
// Returns true if we should query the crowdsourcing server to determine this
// form's field types. If the form includes author-specified types, this will
- // return false.
+ // return false unless there are password fields in the form. If there are no
+ // password fields the assumption is that the author has expressed their
+ // intent and crowdsourced data should not be used to override this. Password
+ // fields are different because there is no way to specify password generation
+ // directly.
bool ShouldBeCrowdsourced() const;
// Sets the field types to be those set for |cached_form|.
@@ -252,6 +256,9 @@ class FormStructure {
// author, via the |autocompletetype| attribute.
bool has_author_specified_types_;
+ // True if the form contains at least one password field.
+ bool has_password_field_;
+
DISALLOW_COPY_AND_ASSIGN(FormStructure);
};
« no previous file with comments | « chrome/browser/autofill/autofill_server_browsertest.cc ('k') | components/autofill/core/browser/form_structure.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698