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

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

Issue 2833193002: Trigger Password Protection ping on username/password field on focus (Closed)
Patch Set: nit Created 3 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.h
diff --git a/components/autofill/content/renderer/password_autofill_agent.h b/components/autofill/content/renderer/password_autofill_agent.h
index 486e8eb34e3202f29e56a32a4083a2098f530edc..4344266517002161ae4b070581f075dfaf64c3a4 100644
--- a/components/autofill/content/renderer/password_autofill_agent.h
+++ b/components/autofill/content/renderer/password_autofill_agent.h
@@ -88,10 +88,14 @@ class PasswordAutofillAgent : public content::RenderFrameObserver,
bool DidClearAutofillSelection(
const blink::WebFormControlElement& control_element);
- // If the form is non-secure, show the "Not Secure" warning on username and
- // password input fields.
+ // Returns whether a "Login not secure" warning should be shown on the input
+ // field. This is true if the feature is enabled and if the form is
+ // non-secure.
bool ShouldShowNotSecureWarning(const blink::WebInputElement& element);
+ // Returns whether the element is a username or password textfield.
+ bool IsUsernameOrPasswordField(const blink::WebInputElement& element);
+
// Shows an Autofill popup with username suggestions for |element|. If
// |show_all| is |true|, will show all possible suggestions for that element,
// otherwise shows suggestions based on current value of |element|.
@@ -286,6 +290,9 @@ class PasswordAutofillAgent : public content::RenderFrameObserver,
// True indicates that a request for credentials has been sent to the store.
bool sent_request_to_store_;
+ // True indicates that a safe browsing reputation check has been triggered.
+ bool checked_safe_browsing_reputation_;
+
// Records the username typed before suggestions preview.
base::string16 username_query_prefix_;

Powered by Google App Engine
This is Rietveld 408576698