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

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

Issue 2055633003: [Password Generation] Sends form classifier vote to autofill server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pg_form_classification
Patch Set: replaced " DCHECK(client_->IsSavingAndFillingEnabledForCurrentPage()) Created 4 years, 6 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_GENERATION_AGENT_H_ 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_ 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // Show UI for editing a generated password at |generation_element_|. 100 // Show UI for editing a generated password at |generation_element_|.
101 void ShowEditingPopup(); 101 void ShowEditingPopup();
102 102
103 // Hides a password generation popup if one exists. 103 // Hides a password generation popup if one exists.
104 void HidePopup(); 104 void HidePopup();
105 105
106 // Sets |generation_element_| to the focused password field and shows a 106 // Sets |generation_element_| to the focused password field and shows a
107 // generation popup at this field. 107 // generation popup at this field.
108 void OnUserTriggeredGeneratePassword(); 108 void OnUserTriggeredGeneratePassword();
109 109
110 // Runs HTML parsing based classifier and saves its outcome to proto.
111 void RunFormClassifierAndSaveVote(const blink::WebFormElement& web_form,
112 const PasswordForm& form);
113
110 // Creates a password form to presave a generated password. It copies behavior 114 // Creates a password form to presave a generated password. It copies behavior
111 // of CreatePasswordFormFromWebForm/FromUnownedInputElements, but takes 115 // of CreatePasswordFormFromWebForm/FromUnownedInputElements, but takes
112 // |password_value| from |generation_element_| and empties |username_value|. 116 // |password_value| from |generation_element_| and empties |username_value|.
113 // If a form creating is failed, returns an empty unique_ptr. 117 // If a form creating is failed, returns an empty unique_ptr.
114 std::unique_ptr<PasswordForm> CreatePasswordFormToPresave(); 118 std::unique_ptr<PasswordForm> CreatePasswordFormToPresave();
115 119
116 // Stores forms that are candidates for account creation. 120 // Stores forms that are candidates for account creation.
117 AccountCreationFormDataList possible_account_creation_forms_; 121 AccountCreationFormDataList possible_account_creation_forms_;
118 122
119 // Stores the origins of the password forms confirmed not to be blacklisted 123 // Stores the origins of the password forms confirmed not to be blacklisted
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // Unowned pointer. Used to notify PassowrdAutofillAgent when values 168 // Unowned pointer. Used to notify PassowrdAutofillAgent when values
165 // in password fields are updated. 169 // in password fields are updated.
166 PasswordAutofillAgent* password_agent_; 170 PasswordAutofillAgent* password_agent_;
167 171
168 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationAgent); 172 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationAgent);
169 }; 173 };
170 174
171 } // namespace autofill 175 } // namespace autofill
172 176
173 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_ 177 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698