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

Side by Side Diff: components/autofill/content/renderer/password_autofill_agent.h

Issue 2833193002: Trigger Password Protection ping on username/password field on focus (Closed)
Patch Set: fix build Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 bool PreviewSuggestion(const blink::WebFormControlElement& node, 81 bool PreviewSuggestion(const blink::WebFormControlElement& node,
82 const blink::WebString& username, 82 const blink::WebString& username,
83 const blink::WebString& password); 83 const blink::WebString& password);
84 84
85 // Clears the preview for the username and password fields, restoring both to 85 // Clears the preview for the username and password fields, restoring both to
86 // their previous filled state. Return false if no login information was 86 // their previous filled state. Return false if no login information was
87 // found for the form. 87 // found for the form.
88 bool DidClearAutofillSelection( 88 bool DidClearAutofillSelection(
89 const blink::WebFormControlElement& control_element); 89 const blink::WebFormControlElement& control_element);
90 90
91 // If the form is non-secure, show the "Not Secure" warning on username and 91 // If "Login not secure" feature is enabled and if the form is non-secure.
Mathieu 2017/05/01 13:40:00 // Returns whether a "Login not secure" warning sh
Jialiu Lin 2017/05/01 18:59:10 Done.
92 // password input fields.
93 bool ShouldShowNotSecureWarning(const blink::WebInputElement& element); 92 bool ShouldShowNotSecureWarning(const blink::WebInputElement& element);
94 93
94 // If the element is a username or password textfield.
Mathieu 2017/05/01 13:40:00 *Returns whether the element is...
Jialiu Lin 2017/05/01 18:59:09 Done.
95 bool IsUsernameOrPasswordField(const blink::WebInputElement& element);
96
95 // Shows an Autofill popup with username suggestions for |element|. If 97 // Shows an Autofill popup with username suggestions for |element|. If
96 // |show_all| is |true|, will show all possible suggestions for that element, 98 // |show_all| is |true|, will show all possible suggestions for that element,
97 // otherwise shows suggestions based on current value of |element|. 99 // otherwise shows suggestions based on current value of |element|.
98 // If |generation_popup_showing| is true, this function will return false 100 // If |generation_popup_showing| is true, this function will return false
99 // as both UIs should not be shown at the same time. This function should 101 // as both UIs should not be shown at the same time. This function should
100 // still be called in this situation so that UMA stats can be logged. 102 // still be called in this situation so that UMA stats can be logged.
101 // Returns true if any suggestions were shown, false otherwise. 103 // Returns true if any suggestions were shown, false otherwise.
102 bool ShowSuggestions(const blink::WebInputElement& element, 104 bool ShowSuggestions(const blink::WebInputElement& element,
103 bool show_all, 105 bool show_all,
104 bool generation_popup_showing); 106 bool generation_popup_showing);
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 bool logging_state_active_; 281 bool logging_state_active_;
280 282
281 // True indicates that the username field was autofilled, false otherwise. 283 // True indicates that the username field was autofilled, false otherwise.
282 bool was_username_autofilled_; 284 bool was_username_autofilled_;
283 // True indicates that the password field was autofilled, false otherwise. 285 // True indicates that the password field was autofilled, false otherwise.
284 bool was_password_autofilled_; 286 bool was_password_autofilled_;
285 287
286 // True indicates that a request for credentials has been sent to the store. 288 // True indicates that a request for credentials has been sent to the store.
287 bool sent_request_to_store_; 289 bool sent_request_to_store_;
288 290
291 // True indicates that a safe browsing reputation check has been triggered.
292 bool checked_safe_browsing_reputation_;
293
289 // Records the username typed before suggestions preview. 294 // Records the username typed before suggestions preview.
290 base::string16 username_query_prefix_; 295 base::string16 username_query_prefix_;
291 296
292 // Contains server predictions for username, password and/or new password 297 // Contains server predictions for username, password and/or new password
293 // fields for individual forms. 298 // fields for individual forms.
294 FormsPredictionsMap form_predictions_; 299 FormsPredictionsMap form_predictions_;
295 300
296 AutofillAgent* autofill_agent_; // Weak reference. 301 AutofillAgent* autofill_agent_; // Weak reference.
297 302
298 mojom::PasswordManagerDriverPtr password_manager_driver_; 303 mojom::PasswordManagerDriverPtr password_manager_driver_;
299 304
300 mojo::Binding<mojom::PasswordAutofillAgent> binding_; 305 mojo::Binding<mojom::PasswordAutofillAgent> binding_;
301 306
302 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); 307 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent);
303 }; 308 };
304 309
305 } // namespace autofill 310 } // namespace autofill
306 311
307 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ 312 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698