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

Unified Diff: components/autofill/content/renderer/form_autofill_util.h

Issue 2148303005: [Password Generation] Sends the flag whether a field has nonempty user input (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a typo Created 4 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
Index: components/autofill/content/renderer/form_autofill_util.h
diff --git a/components/autofill/content/renderer/form_autofill_util.h b/components/autofill/content/renderer/form_autofill_util.h
index 7f2391dcbf731582d143896e87c92f456e35e664..f1f84bae9234cf41f799d7832869d78016a48609 100644
--- a/components/autofill/content/renderer/form_autofill_util.h
+++ b/components/autofill/content/renderer/form_autofill_util.h
@@ -11,6 +11,7 @@
#include "base/macros.h"
#include "base/strings/string16.h"
+#include <components/autofill/content/renderer/password_form_conversion_utils.h>
#include "components/autofill/core/common/autofill_constants.h"
#include "components/autofill/core/common/password_form_field_prediction_map.h"
#include "third_party/WebKit/public/platform/WebVector.h"
@@ -143,9 +144,12 @@ std::vector<blink::WebFormControlElement> ExtractAutofillableElementsInForm(
const blink::WebFormElement& form_element);
// Fills out a FormField object from a given WebFormControlElement.
-// |extract_mask|: See the enum ExtractMask above for details.
+// |extract_mask|: See the enum ExtractMask above for details. Field properties
+// will be copied from |field_value_and_properties_map|, if the argument is not
+// null and has entry for |element| (see properties in FieldPropertiesFlags).
void WebFormControlElementToFormField(
const blink::WebFormControlElement& element,
+ const FieldValueAndPropertiesMaskMap* field_value_and_properties_map,
ExtractMask extract_mask,
FormFieldData* field);
@@ -153,10 +157,13 @@ void WebFormControlElementToFormField(
// If |field| is non-NULL, also fills |field| with the FormField object
// corresponding to the |form_control_element|. |extract_mask| controls what
// data is extracted. Returns true if |form| is filled out. Also returns false
-// if there are no fields or too many fields in the |form|.
+// if there are no fields or too many fields in the |form|. Field properties
+// will be copied from |field_value_and_properties_map|, if the argument is not
+// null and has entry for |element| (see properties in FieldPropertiesFlags).
bool WebFormElementToFormData(
const blink::WebFormElement& form_element,
const blink::WebFormControlElement& form_control_element,
+ const FieldValueAndPropertiesMaskMap* field_value_and_properties_map,
ExtractMask extract_mask,
FormData* form,
FormFieldData* field);
@@ -192,12 +199,15 @@ bool UnownedCheckoutFormElementsAndFieldSetsToFormData(
FormFieldData* field);
// Same as above, but without the requirement that the elements only be
-// related to checkout.
+// related to checkout. Field properties of |control_elements| will be copied
+// from |field_value_and_properties_map|, if the argument is not null and has
+// corresponding entries (see properties in FieldPropertiesFlags).
bool UnownedPasswordFormElementsAndFieldSetsToFormData(
const std::vector<blink::WebElement>& fieldsets,
const std::vector<blink::WebFormControlElement>& control_elements,
const blink::WebFormControlElement* element,
const blink::WebDocument& document,
+ const FieldValueAndPropertiesMaskMap* field_value_and_properties_map,
ExtractMask extract_mask,
FormData* form,
FormFieldData* field);

Powered by Google App Engine
This is Rietveld 408576698