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

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

Issue 1039833002: [Password Manager] Unify action and origin detection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test Created 5 years, 9 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 d5fa13fa91447a2ac42fd03742ad5b60f07bbaa5..246335eba904bf0a4c0f0372ee8a007954e63495 100644
--- a/components/autofill/content/renderer/password_form_conversion_utils.h
+++ b/components/autofill/content/renderer/password_form_conversion_utils.h
@@ -8,8 +8,10 @@
#include <map>
#include "base/memory/scoped_ptr.h"
+#include "url/gurl.h"
namespace blink {
+class WebDocument;
class WebFormElement;
class WebInputElement;
class WebString;
@@ -19,6 +21,12 @@ namespace autofill {
struct PasswordForm;
+// Helper functions to assist in getting the canonical form of the action and
+// origin. The action will proplerly take into account <BASE>, and both will
+// strip unnecessary data (e.g. query params and HTTP credentials).
+GURL GetCanonicalActionForForm(const blink::WebFormElement& form);
+GURL GetCanonicalOriginForDocument(const blink::WebDocument& document);
+
// 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
// happens with a given form and compare against previously Create'd forms

Powered by Google App Engine
This is Rietveld 408576698