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

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

Issue 1002653002: [Password Manager] Use XHR completion as a possible signal for form submission (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « components/autofill/content/renderer/password_form_conversion_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/content/renderer/password_form_conversion_utils.cc
diff --git a/components/autofill/content/renderer/password_form_conversion_utils.cc b/components/autofill/content/renderer/password_form_conversion_utils.cc
index 3918ef2d375ce8f657ece8faca4549277cc0827c..928fb81f72e26ccac25621a734dac764e059dc4f 100644
--- a/components/autofill/content/renderer/password_form_conversion_utils.cc
+++ b/components/autofill/content/renderer/password_form_conversion_utils.cc
@@ -216,10 +216,7 @@ void GetPasswordForm(const WebFormElement& form,
GURL full_origin(form.document().url());
// Calculate the canonical action URL
- WebString action = form.action();
- if (action.isNull())
- action = WebString(""); // missing 'action' attribute implies current URL
- GURL full_action(form.document().completeURL(action));
+ GURL full_action = GetCanonicalActionURL(form);
if (!full_action.is_valid())
return;
@@ -291,4 +288,11 @@ scoped_ptr<PasswordForm> CreatePasswordForm(
return password_form.Pass();
}
+GURL GetCanonicalActionURL(const WebFormElement& form) {
+ WebString action = form.action();
+ if (action.isNull())
+ action = WebString(""); // missing 'action' attribute implies current URL
+ return GURL(form.document().completeURL(action));
+}
+
} // namespace autofill
« no previous file with comments | « components/autofill/content/renderer/password_form_conversion_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698