| 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
|
|
|