OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_METRICS_UTIL_H _ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_METRICS_UTIL_H _ |
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_METRICS_UTIL_H _ | 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_METRICS_UTIL_H _ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "components/autofill/core/common/password_form.h" | 12 #include "components/autofill/core/common/password_form.h" |
13 #include "components/password_manager/core/common/credential_manager_types.h" | |
13 | 14 |
14 namespace password_manager { | 15 namespace password_manager { |
15 | 16 |
16 namespace metrics_util { | 17 namespace metrics_util { |
17 | 18 |
18 // Metrics: "PasswordManager.InfoBarResponse" | 19 // Metrics: "PasswordManager.InfoBarResponse" |
19 enum ResponseType { | 20 enum ResponseType { |
20 NO_RESPONSE = 0, | 21 NO_RESPONSE = 0, |
21 REMEMBER_PASSWORD, | 22 REMEMBER_PASSWORD, |
22 NEVER_REMEMBER_PASSWORD, | 23 NEVER_REMEMBER_PASSWORD, |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
163 CREDENTIAL_MANAGER_GET_NONE_FIRST_RUN, | 164 CREDENTIAL_MANAGER_GET_NONE_FIRST_RUN, |
164 // Return empty credential for whatever reason. | 165 // Return empty credential for whatever reason. |
165 CREDENTIAL_MANAGER_GET_NONE, | 166 CREDENTIAL_MANAGER_GET_NONE, |
166 // Return a credential from the account chooser. | 167 // Return a credential from the account chooser. |
167 CREDENTIAL_MANAGER_GET_ACCOUNT_CHOOSER, | 168 CREDENTIAL_MANAGER_GET_ACCOUNT_CHOOSER, |
168 // User is auto signed in. | 169 // User is auto signed in. |
169 CREDENTIAL_MANAGER_GET_AUTOSIGNIN, | 170 CREDENTIAL_MANAGER_GET_AUTOSIGNIN, |
170 CREDENTIAL_MANAGER_GET_COUNT | 171 CREDENTIAL_MANAGER_GET_COUNT |
171 }; | 172 }; |
172 | 173 |
173 enum CredentialManagerGetMediation { | |
174 CREDENTIAL_MANAGER_GET_MEDIATED, | |
175 CREDENTIAL_MANAGER_GET_UNMEDIATED | |
176 }; | |
177 | |
178 // Metrics: "PasswordManager.HttpPasswordMigrationMode" | 174 // Metrics: "PasswordManager.HttpPasswordMigrationMode" |
179 enum HttpPasswordMigrationMode { | 175 enum HttpPasswordMigrationMode { |
180 HTTP_PASSWORD_MIGRATION_MODE_MOVE, | 176 HTTP_PASSWORD_MIGRATION_MODE_MOVE, |
181 HTTP_PASSWORD_MIGRATION_MODE_COPY, | 177 HTTP_PASSWORD_MIGRATION_MODE_COPY, |
182 HTTP_PASSWORD_MIGRATION_MODE_COUNT | 178 HTTP_PASSWORD_MIGRATION_MODE_COUNT |
183 }; | 179 }; |
184 | 180 |
185 enum PasswordReusePasswordFieldDetected { | 181 enum PasswordReusePasswordFieldDetected { |
186 NO_PASSWORD_FIELD, | 182 NO_PASSWORD_FIELD, |
187 HAS_PASSWORD_FIELD, | 183 HAS_PASSWORD_FIELD, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
240 | 236 |
241 // Logs mode of HTTP password migration. | 237 // Logs mode of HTTP password migration. |
242 void LogHttpPasswordMigrationMode(HttpPasswordMigrationMode mode); | 238 void LogHttpPasswordMigrationMode(HttpPasswordMigrationMode mode); |
243 | 239 |
244 // Log if the account chooser has empty username or duplicate usernames. In | 240 // Log if the account chooser has empty username or duplicate usernames. In |
245 // addition record number of the placeholder avatars and total number of rows. | 241 // addition record number of the placeholder avatars and total number of rows. |
246 void LogAccountChooserUsability(AccountChooserUsabilityMetric usability, | 242 void LogAccountChooserUsability(AccountChooserUsabilityMetric usability, |
247 int count_empty_icons, | 243 int count_empty_icons, |
248 int count_accounts); | 244 int count_accounts); |
249 | 245 |
250 // Log the result of navigator.credentials.get. |status| specifies the | 246 // Log the result of navigator.credentials.get. |status| specifies the |
vasilii
2017/05/18 12:34:03
Not |status| anymore.
jdoerrie
2017/05/18 14:57:25
Acknowledged, I'll drop it. '|mediation| specifies
| |
251 // "unmediated" parameter of the API method. | 247 // "mediation" parameter of the API method. |
252 void LogCredentialManagerGetResult(CredentialManagerGetResult result, | 248 void LogCredentialManagerGetResult(CredentialManagerGetResult result, |
253 CredentialManagerGetMediation status); | 249 CredentialMediationRequirement mediation); |
254 | 250 |
255 // Log the password reuse. | 251 // Log the password reuse. |
256 void LogPasswordReuse(int password_length, | 252 void LogPasswordReuse(int password_length, |
257 int saved_passwords, | 253 int saved_passwords, |
258 int number_matches, | 254 int number_matches, |
259 bool password_field_detected); | 255 bool password_field_detected); |
260 | 256 |
261 // Log when the user selects the "Login not secure" warning in the password | 257 // Log when the user selects the "Login not secure" warning in the password |
262 // autofill dropdown to show more information about the warning. | 258 // autofill dropdown to show more information about the warning. |
263 void LogShowedHttpNotSecureExplanation(); | 259 void LogShowedHttpNotSecureExplanation(); |
264 | 260 |
265 // Log that the Form-Not-Secure warning was shown. Should be called at most once | 261 // Log that the Form-Not-Secure warning was shown. Should be called at most once |
266 // per main-frame navigation. | 262 // per main-frame navigation. |
267 void LogShowedFormNotSecureWarningOnCurrentNavigation(); | 263 void LogShowedFormNotSecureWarningOnCurrentNavigation(); |
268 | 264 |
269 // Log a password successful submission event. | 265 // Log a password successful submission event. |
270 void LogPasswordSuccessfulSubmissionIndicatorEvent( | 266 void LogPasswordSuccessfulSubmissionIndicatorEvent( |
271 autofill::PasswordForm::SubmissionIndicatorEvent event); | 267 autofill::PasswordForm::SubmissionIndicatorEvent event); |
272 | 268 |
273 } // namespace metrics_util | 269 } // namespace metrics_util |
274 | 270 |
275 } // namespace password_manager | 271 } // namespace password_manager |
276 | 272 |
277 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_METRICS_UTI L_H_ | 273 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_METRICS_UTI L_H_ |
OLD | NEW |