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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 19705013: [password autofill] Remove references to PasswordForm from RenderViewImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | « content/public/renderer/render_view_observer.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 92bfb3d6a3cf230ce5cc86dc21238ab1ee03e6b3..784e988182b1e4e89324d0bd2c1066c69f1e365f 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -284,13 +284,9 @@ WebKit::WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
void RenderFrameImpl::willSendSubmitEvent(WebKit::WebFrame* frame,
const WebKit::WebFormElement& form) {
- // Some login forms have onSubmit handlers that put a hash of the password
- // into a hidden field and then clear the password. (Issue 28910.)
- // This method gets called before any of those handlers run, so save away
- // a copy of the password in case it gets lost.
- DocumentState* document_state =
- DocumentState::FromDataSource(frame->dataSource());
- document_state->set_password_form_data(CreatePasswordForm(form));
+ // Call back to RenderViewImpl for observers to be notified.
+ // TODO(nasko): Remove once we have RenderFrameObserver.
+ render_view_->willSendSubmitEvent(frame, form);
}
void RenderFrameImpl::willSubmitForm(WebKit::WebFrame* frame,
@@ -311,25 +307,6 @@ void RenderFrameImpl::willSubmitForm(WebKit::WebFrame* frame,
internal_data->set_searchable_form_url(web_searchable_form_data.url());
internal_data->set_searchable_form_encoding(
web_searchable_form_data.encoding().utf8());
- scoped_ptr<PasswordForm> password_form_data =
- CreatePasswordForm(form);
-
- // In order to save the password that the user actually typed and not one
- // that may have gotten transformed by the site prior to submit, recover it
- // from the form contents already stored by |willSendSubmitEvent| into the
- // dataSource's NavigationState (as opposed to the provisionalDataSource's,
- // which is what we're storing into now.)
- if (password_form_data) {
- DocumentState* old_document_state =
- DocumentState::FromDataSource(frame->dataSource());
- if (old_document_state) {
- PasswordForm* old_form_data = old_document_state->password_form_data();
- if (old_form_data && old_form_data->action == password_form_data->action)
- password_form_data->password_value = old_form_data->password_value;
- }
- }
-
- document_state->set_password_form_data(password_form_data.Pass());
// Call back to RenderViewImpl for observers to be notified.
// TODO(nasko): Remove once we have RenderFrameObserver.
« no previous file with comments | « content/public/renderer/render_view_observer.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698