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

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

Issue 241193002: Password autofill: Check for user gesture switches to new Blink backend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OVERRIDE removed test enabled Created 6 years, 8 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_autofill_agent.cc
diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc
index 5ba541b5ee5bfcf8346d4af9ee685e213a8246b7..2ac7f82ab1457d667b83ec0bd3d2f973d6f69317 100644
--- a/components/autofill/content/renderer/password_autofill_agent.cc
+++ b/components/autofill/content/renderer/password_autofill_agent.cc
@@ -395,6 +395,10 @@ void PasswordAutofillAgent::OnDynamicFormsSeen(blink::WebFrame* frame) {
SendPasswordForms(frame, false /* only_visible */);
}
+void PasswordAutofillAgent::FirstUserGestureObserved() {
+ gatekeeper_.OnUserGesture();
+}
+
void PasswordAutofillAgent::SendPasswordForms(blink::WebFrame* frame,
bool only_visible) {
// Make sure that this security origin is allowed to use password manager.
@@ -517,10 +521,6 @@ void PasswordAutofillAgent::WillSubmitForm(blink::WebLocalFrame* frame,
}
}
-void PasswordAutofillAgent::WillProcessUserGesture() {
- gatekeeper_.OnUserGesture();
-}
-
blink::WebFrame* PasswordAutofillAgent::CurrentOrChildFrameWithSavedForms(
const blink::WebFrame* current_frame) {
for (FrameToPasswordFormMap::const_iterator it =
@@ -818,17 +818,11 @@ bool PasswordAutofillAgent::FillUserNameAndPassword(
return false;
}
-// TODO(vabr): The "gatekeeper" feature is currently disabled on mobile.
-// http://crbug.com/345510#c13
-#if !defined(OS_ANDROID) || !defined(OS_IOS)
// Wait to fill in the password until a user gesture occurs. This is to make
// sure that we do not fill in the DOM with a password until we believe the
// user is intentionally interacting with the page.
password_element->setSuggestedValue(password);
gatekeeper_.RegisterElement(password_element);
-#else
- password_element->setValue(password);
-#endif
password_element->setAutofilled(true);
return true;

Powered by Google App Engine
This is Rietveld 408576698