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

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

Issue 1012093005: [Password Manager] Offer to save when an iframe is detached (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change upstream 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 | « chrome/test/data/password/inner_frame.html ('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_autofill_agent.cc
diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc
index d7b291a15f11e026398cc7d282d9d597b9c486cb..d3fe5c0c693eca65b0a768bc22ce5a4493a98085 100644
--- a/components/autofill/content/renderer/password_autofill_agent.cc
+++ b/components/autofill/content/renderer/password_autofill_agent.cc
@@ -1030,6 +1030,14 @@ void PasswordAutofillAgent::DidStopLoading() {
}
void PasswordAutofillAgent::FrameDetached() {
+ // If a sub frame has been destroyed while the user was entering information
+ // into a password form, try to save the data. See https://crbug.com/450806
+ // for examples of sites that perform login using this technique.
+ if (render_frame()->GetWebFrame()->parent() &&
+ ProvisionallySavedPasswordIsValid()) {
+ Send(new AutofillHostMsg_InPageNavigation(routing_id(),
+ *provisionally_saved_form_));
+ }
FrameClosing();
}
« no previous file with comments | « chrome/test/data/password/inner_frame.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698