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

Unified Diff: components/autofill/content/renderer/password_form_conversion_utils.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/password_form_conversion_utils.h
diff --git a/components/autofill/content/renderer/password_form_conversion_utils.h b/components/autofill/content/renderer/password_form_conversion_utils.h
index 2d2847a18a8dedf0c0631ac3c2f081aa5692965c..235c9b5a7cc448497ce43eb33ac7e2c73963b488 100644
--- a/components/autofill/content/renderer/password_form_conversion_utils.h
+++ b/components/autofill/content/renderer/password_form_conversion_utils.h
@@ -9,6 +9,7 @@
#include <memory>
#include <vector>
+#include <components/autofill/core/common/password_form.h>
#include "components/autofill/core/common/password_form_field_prediction_map.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "url/gurl.h"
@@ -35,8 +36,10 @@ bool IsGaiaReauthenticationForm(
const GURL& origin,
const std::vector<blink::WebFormControlElement>& control_elements);
-typedef std::map<const blink::WebInputElement,
- blink::WebString> ModifiedValues;
+typedef std::map<
+ const blink::WebFormControlElement,
+ std::pair<std::unique_ptr<base::string16>, FieldPropertiesMask>>
+ FieldValueAndPropertiesMaskMap;
// Create a PasswordForm from DOM form. Webkit doesn't allow storing
// custom metadata to DOM nodes, so we have to do this every time an event
@@ -49,14 +52,14 @@ typedef std::map<const blink::WebInputElement,
// overwriting default username element selection.
std::unique_ptr<PasswordForm> CreatePasswordFormFromWebForm(
const blink::WebFormElement& form,
- const ModifiedValues* nonscript_modified_values,
+ const FieldValueAndPropertiesMaskMap* nonscript_modified_values,
const FormsPredictionsMap* form_predictions);
// Same as CreatePasswordFormFromWebForm() but for input elements that are not
// enclosed in <form> element.
std::unique_ptr<PasswordForm> CreatePasswordFormFromUnownedInputElements(
const blink::WebFrame& frame,
- const ModifiedValues* nonscript_modified_values,
+ const FieldValueAndPropertiesMaskMap* nonscript_modified_values,
const FormsPredictionsMap* form_predictions);
// Checks in a case-insensitive way if the autocomplete attribute for the given

Powered by Google App Engine
This is Rietveld 408576698