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

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

Issue 1686063004: Sending generated vote on password generation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix BUILD.gn Created 4 years, 10 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 void ShowGenerationPopup(); 97 void ShowGenerationPopup();
98 98
99 // Show UI for editing a generated password at |generation_element_|. 99 // Show UI for editing a generated password at |generation_element_|.
100 void ShowEditingPopup(); 100 void ShowEditingPopup();
101 101
102 // Hides a password generation popup if one exists. 102 // Hides a password generation popup if one exists.
103 void HidePopup(); 103 void HidePopup();
104 104
105 // Sets |generation_element_| to the focused password field and shows a 105 // Sets |generation_element_| to the focused password field and shows a
106 // generation popup at this field. 106 // generation popup at this field.
107 void OnGeneratePassword(); 107 void OnUserTriggeredGeneratePassword();
108 108
109 // Stores forms that are candidates for account creation. 109 // Stores forms that are candidates for account creation.
110 AccountCreationFormDataList possible_account_creation_forms_; 110 AccountCreationFormDataList possible_account_creation_forms_;
111 111
112 // Stores the origins of the password forms confirmed not to be blacklisted 112 // Stores the origins of the password forms confirmed not to be blacklisted
113 // by the browser. A form can be blacklisted if a user chooses "never save 113 // by the browser. A form can be blacklisted if a user chooses "never save
114 // passwords for this site". 114 // passwords for this site".
115 std::vector<GURL> not_blacklisted_password_form_origins_; 115 std::vector<GURL> not_blacklisted_password_form_origins_;
116 116
117 // Stores each password form for which the Autofill server classifies one of 117 // Stores each password form for which the Autofill server classifies one of
118 // the form's fields as an ACCOUNT_CREATION_PASSWORD or NEW_PASSWORD. These 118 // the form's fields as an ACCOUNT_CREATION_PASSWORD or NEW_PASSWORD. These
119 // forms will not be sent if the feature is disabled. 119 // forms will not be sent if the feature is disabled.
120 std::vector<autofill::PasswordFormGenerationData> generation_enabled_forms_; 120 std::vector<autofill::PasswordFormGenerationData> generation_enabled_forms_;
121 121
122 // Data for form which generation is allowed on. 122 // Data for form which generation is allowed on.
123 scoped_ptr<AccountCreationFormData> generation_form_data_; 123 scoped_ptr<AccountCreationFormData> generation_form_data_;
124 124
125 // Element where we want to trigger password generation UI. 125 // Element where we want to trigger password generation UI.
126 blink::WebInputElement generation_element_; 126 blink::WebInputElement generation_element_;
127 127
128 // If the password field at |generation_element_| contains a generated 128 // If the password field at |generation_element_| contains a generated
129 // password. 129 // password.
130 bool password_is_generated_; 130 bool password_is_generated_;
131 131
132 // True if password generation was manually triggered.
133 bool is_manually_triggered_;
134
132 // True if a password was generated and the user edited it. Used for UMA 135 // True if a password was generated and the user edited it. Used for UMA
133 // stats. 136 // stats.
134 bool password_edited_; 137 bool password_edited_;
135 138
136 // True if the generation popup was shown during this navigation. Used to 139 // True if the generation popup was shown during this navigation. Used to
137 // track UMA stats per page visit rather than per display, since the former 140 // track UMA stats per page visit rather than per display, since the former
138 // is more interesting. 141 // is more interesting.
139 bool generation_popup_shown_; 142 bool generation_popup_shown_;
140 143
141 // True if the editing popup was shown during this navigation. Used to track 144 // True if the editing popup was shown during this navigation. Used to track
142 // UMA stats per page rather than per display, since the former is more 145 // UMA stats per page rather than per display, since the former is more
143 // interesting. 146 // interesting.
144 bool editing_popup_shown_; 147 bool editing_popup_shown_;
145 148
146 // If this feature is enabled. Controlled by Finch. 149 // If this feature is enabled. Controlled by Finch.
147 bool enabled_; 150 bool enabled_;
148 151
149 // Unowned pointer. Used to notify PassowrdAutofillAgent when values 152 // Unowned pointer. Used to notify PassowrdAutofillAgent when values
150 // in password fields are updated. 153 // in password fields are updated.
151 PasswordAutofillAgent* password_agent_; 154 PasswordAutofillAgent* password_agent_;
152 155
153 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationAgent); 156 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationAgent);
154 }; 157 };
155 158
156 } // namespace autofill 159 } // namespace autofill
157 160
158 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_ 161 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698