summaryrefslogtreecommitdiff
path: root/chromium/components/password_manager/core/browser/password_form_metrics_recorder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/components/password_manager/core/browser/password_form_metrics_recorder.cc')
-rw-r--r--chromium/components/password_manager/core/browser/password_form_metrics_recorder.cc27
1 files changed, 21 insertions, 6 deletions
diff --git a/chromium/components/password_manager/core/browser/password_form_metrics_recorder.cc b/chromium/components/password_manager/core/browser/password_form_metrics_recorder.cc
index 858ba912052..576f4c3dbc9 100644
--- a/chromium/components/password_manager/core/browser/password_form_metrics_recorder.cc
+++ b/chromium/components/password_manager/core/browser/password_form_metrics_recorder.cc
@@ -39,14 +39,14 @@ PasswordFormMetricsRecorder::BubbleDismissalReason GetBubbleDismissalReason(
// Ignore these for metrics collection:
case metrics_util::CLICKED_MANAGE:
- case metrics_util::CLICKED_DONE:
- case metrics_util::CLICKED_OK:
case metrics_util::CLICKED_BRAND_NAME:
case metrics_util::CLICKED_PASSWORDS_DASHBOARD:
case metrics_util::AUTO_SIGNIN_TOAST_TIMEOUT:
break;
// These should not reach here:
+ case metrics_util::CLICKED_DONE_OBSOLETE:
+ case metrics_util::CLICKED_OK_OBSOLETE:
case metrics_util::CLICKED_UNBLACKLIST_OBSOLETE:
case metrics_util::CLICKED_CREDENTIAL_OBSOLETE:
case metrics_util::AUTO_SIGNIN_TOAST_CLICKED_OBSOLETE:
@@ -118,17 +118,20 @@ PasswordFormMetricsRecorder::~PasswordFormMetricsRecorder() {
ukm_entry_builder_.SetUser_Action_TriggeredManualFallbackForSaving(
action.second);
break;
- case DetailedUserAction::kTriggeredManualFallbackForUpdating:
- ukm_entry_builder_.SetUser_Action_TriggeredManualFallbackForUpdating(
- action.second);
- break;
case DetailedUserAction::kCorrectedUsernameInForm:
ukm_entry_builder_.SetUser_Action_CorrectedUsernameInForm(
action.second);
break;
+ case DetailedUserAction::kObsoleteTriggeredManualFallbackForUpdating:
+ NOTREACHED();
+ break;
}
}
+ if (showed_manual_fallback_for_saving_) {
+ ukm_entry_builder_.SetSaving_ShowedManualFallbackForSaving(
+ showed_manual_fallback_for_saving_.value());
+ }
ukm_entry_builder_.Record(ukm::UkmRecorder::Get());
}
@@ -200,6 +203,11 @@ void PasswordFormMetricsRecorder::SetSubmittedFormType(
submitted_form_type_ = form_type;
}
+void PasswordFormMetricsRecorder::SetSubmissionIndicatorEvent(
+ autofill::PasswordForm::SubmissionIndicatorEvent event) {
+ ukm_entry_builder_.SetSubmission_Indicator(static_cast<int>(event));
+}
+
int PasswordFormMetricsRecorder::GetActionsTakenNew() const {
// Merge kManagerActionNone and kManagerActionBlacklisted_Obsolete. This
// lowers the number of histogram buckets used by 33%.
@@ -231,6 +239,13 @@ void PasswordFormMetricsRecorder::RecordFormSignature(
HashFormSignature(form_signature));
}
+void PasswordFormMetricsRecorder::RecordShowManualFallbackForSaving(
+ bool has_generated_password,
+ bool is_update) {
+ showed_manual_fallback_for_saving_ =
+ 1 + (has_generated_password ? 2 : 0) + (is_update ? 4 : 0);
+}
+
int PasswordFormMetricsRecorder::GetActionsTaken() const {
return static_cast<int>(user_action_) +
static_cast<int>(UserAction::kMax) *