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.cc44
1 files changed, 44 insertions, 0 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 576f4c3dbc9..226cc8e5e24 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
@@ -128,10 +128,27 @@ PasswordFormMetricsRecorder::~PasswordFormMetricsRecorder() {
}
}
+ ukm_entry_builder_.SetGeneration_GeneratedPassword(
+ has_generated_password_ ? 1 : 0);
+ if (has_generated_password_) {
+ ukm_entry_builder_.SetGeneration_GeneratedPasswordModified(
+ has_generated_password_changed_ ? 1 : 0);
+ }
+ if (password_generation_popup_shown_ !=
+ PasswordGenerationPopupShown::kNotShown) {
+ ukm_entry_builder_.SetGeneration_PopupShown(
+ static_cast<int64_t>(password_generation_popup_shown_));
+ }
+ if (spec_priority_of_generated_password_) {
+ ukm_entry_builder_.SetGeneration_SpecPriority(
+ spec_priority_of_generated_password_.value());
+ }
+
if (showed_manual_fallback_for_saving_) {
ukm_entry_builder_.SetSaving_ShowedManualFallbackForSaving(
showed_manual_fallback_for_saving_.value());
}
+
ukm_entry_builder_.Record(ukm::UkmRecorder::Get());
}
@@ -144,6 +161,16 @@ void PasswordFormMetricsRecorder::SetHasGeneratedPassword(
has_generated_password_ = has_generated_password;
}
+void PasswordFormMetricsRecorder::SetHasGeneratedPasswordChanged(
+ bool has_generated_password_changed) {
+ has_generated_password_changed_ = has_generated_password_changed;
+}
+
+void PasswordFormMetricsRecorder::ReportSpecPriorityForGeneratedPassword(
+ uint32_t spec_priority) {
+ spec_priority_of_generated_password_ = spec_priority;
+}
+
void PasswordFormMetricsRecorder::SetManagerAction(
ManagerAction manager_action) {
manager_action_ = manager_action;
@@ -198,6 +225,17 @@ void PasswordFormMetricsRecorder::LogSubmitFailed() {
submit_result_ = kSubmitResultFailed;
}
+void PasswordFormMetricsRecorder::SetPasswordGenerationPopupShown(
+ bool generation_popup_was_shown,
+ bool is_manual_generation) {
+ password_generation_popup_shown_ =
+ generation_popup_was_shown
+ ? (is_manual_generation
+ ? PasswordGenerationPopupShown::kShownManually
+ : PasswordGenerationPopupShown::kShownAutomatically)
+ : PasswordGenerationPopupShown::kNotShown;
+}
+
void PasswordFormMetricsRecorder::SetSubmittedFormType(
SubmittedFormType form_type) {
submitted_form_type_ = form_type;
@@ -239,6 +277,12 @@ void PasswordFormMetricsRecorder::RecordFormSignature(
HashFormSignature(form_signature));
}
+void PasswordFormMetricsRecorder::RecordParsingsComparisonResult(
+ ParsingComparisonResult comparison_result) {
+ ukm_entry_builder_.SetParsingComparison(
+ static_cast<uint64_t>(comparison_result));
+}
+
void PasswordFormMetricsRecorder::RecordShowManualFallbackForSaving(
bool has_generated_password,
bool is_update) {