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

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

Issue 2320563002: [Password Generation] Use canonical version of action in for form matching in PasswordGenerationAgen (Closed)
Patch Set: Changed to password generation specific version Created 4 years, 3 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.cc
diff --git a/components/autofill/content/renderer/form_autofill_util.cc b/components/autofill/content/renderer/form_autofill_util.cc
index 3de92a1d6cc1b9e83afae01b49ab6aeac2273459..c97efe0f98e55191d1667c549cd4e5e31d77634c 100644
--- a/components/autofill/content/renderer/form_autofill_util.cc
+++ b/components/autofill/content/renderer/form_autofill_util.cc
@@ -1173,17 +1173,6 @@ bool UnownedFormElementsAndFieldSetsToFormData(
field_value_and_properties_map, extract_mask, form, field);
}
-GURL StripAuthAndParams(const GURL& gurl) {
- // We want to keep the path but strip any authentication data, as well as
- // query and ref portions of URL, for the form action and form origin.
- GURL::Replacements rep;
- rep.ClearUsername();
- rep.ClearPassword();
- rep.ClearQuery();
- rep.ClearRef();
- return gurl.ReplaceComponents(rep);
-}
-
} // namespace
ScopedLayoutPreventer::ScopedLayoutPreventer() {
@@ -1198,6 +1187,17 @@ ScopedLayoutPreventer::~ScopedLayoutPreventer() {
g_prevent_layout = false;
}
+GURL StripAuthAndParams(const GURL& gurl) {
+ // We want to keep the path but strip any authentication data, as well as
vabr (Chromium) 2016/09/07 13:10:08 nit: The old comment is vague and out of date (usa
kolos1 2016/09/07 13:18:59 Done.
+ // query and ref portions of URL, for the form action and form origin.
+ GURL::Replacements rep;
+ rep.ClearUsername();
+ rep.ClearPassword();
+ rep.ClearQuery();
+ rep.ClearRef();
+ return gurl.ReplaceComponents(rep);
+}
+
bool ExtractFormData(const WebFormElement& form_element, FormData* data) {
return WebFormElementToFormData(
form_element, WebFormControlElement(), nullptr,

Powered by Google App Engine
This is Rietveld 408576698