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

Side by Side Diff: components/password_manager/core/browser/password_manager_metrics_util.h

Issue 2864493003: Deprecate CredentialRequestOptions.unmediated in favor mediation enum (Closed)
Patch Set: Rebase 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 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
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
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.
251 // "unmediated" parameter of the API method.
252 void LogCredentialManagerGetResult(CredentialManagerGetResult result, 247 void LogCredentialManagerGetResult(CredentialManagerGetResult result,
253 CredentialManagerGetMediation status); 248 CredentialMediationRequirement mediation);
254 249
255 // Log the password reuse. 250 // Log the password reuse.
256 void LogPasswordReuse(int password_length, 251 void LogPasswordReuse(int password_length,
257 int saved_passwords, 252 int saved_passwords,
258 int number_matches, 253 int number_matches,
259 bool password_field_detected); 254 bool password_field_detected);
260 255
261 // Log when the user selects the "Login not secure" warning in the password 256 // Log when the user selects the "Login not secure" warning in the password
262 // autofill dropdown to show more information about the warning. 257 // autofill dropdown to show more information about the warning.
263 void LogShowedHttpNotSecureExplanation(); 258 void LogShowedHttpNotSecureExplanation();
264 259
265 // Log that the Form-Not-Secure warning was shown. Should be called at most once 260 // Log that the Form-Not-Secure warning was shown. Should be called at most once
266 // per main-frame navigation. 261 // per main-frame navigation.
267 void LogShowedFormNotSecureWarningOnCurrentNavigation(); 262 void LogShowedFormNotSecureWarningOnCurrentNavigation();
268 263
269 // Log a password successful submission event. 264 // Log a password successful submission event.
270 void LogPasswordSuccessfulSubmissionIndicatorEvent( 265 void LogPasswordSuccessfulSubmissionIndicatorEvent(
271 autofill::PasswordForm::SubmissionIndicatorEvent event); 266 autofill::PasswordForm::SubmissionIndicatorEvent event);
272 267
273 } // namespace metrics_util 268 } // namespace metrics_util
274 269
275 } // namespace password_manager 270 } // namespace password_manager
276 271
277 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_METRICS_UTI L_H_ 272 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_METRICS_UTI L_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698