Index: chrome/browser/ui/passwords/manage_passwords_bubble_model.cc |
diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc b/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc |
index 5d5a6b8d59d8f32b7ec697f875f0a1eb846b198c..5dd71865dd53f42935cc812adf005f38eb7d7703 100644 |
--- a/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc |
+++ b/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc |
@@ -80,8 +80,8 @@ class ManagePasswordsBubbleModel::InteractionKeeper { |
~InteractionKeeper() = default; |
- // Records UMA events and updates the interaction statistics when the bubble |
- // is closed. |
+ // Records UMA events, updates the interaction statistics and sends |
+ // notifications to the delegate when the bubble is closed. |
void ReportInteractions(const ManagePasswordsBubbleModel* model); |
void set_dismissal_reason( |
@@ -200,15 +200,22 @@ void ManagePasswordsBubbleModel::InteractionKeeper::ReportInteractions( |
if (model->state() == password_manager::ui::PENDING_PASSWORD_UPDATE_STATE || |
model->state() == password_manager::ui::PENDING_PASSWORD_STATE) { |
+ // Send a notification if there was no interaction with the bubble. |
+ bool no_interaction = |
+ model->state() == password_manager::ui::PENDING_PASSWORD_UPDATE_STATE |
+ ? update_password_submission_event_ == |
+ metrics_util::NO_UPDATE_SUBMISSION |
+ : dismissal_reason_ == metrics_util::NO_DIRECT_INTERACTION; |
+ if (no_interaction && model->delegate_) { |
+ model->delegate_->OnNoInteraction(); |
+ } |
+ |
+ // Send UMA. |
if (update_password_submission_event_ == |
metrics_util::NO_UPDATE_SUBMISSION) { |
update_password_submission_event_ = |
model->GetUpdateDismissalReason(NO_INTERACTION); |
- if (model->delegate_ && |
- model->state() == password_manager::ui::PENDING_PASSWORD_UPDATE_STATE) |
- model->delegate_->OnNoInteractionOnUpdate(); |
} |
- |
if (update_password_submission_event_ != metrics_util::NO_UPDATE_SUBMISSION) |
LogUpdatePasswordSubmissionEvent(update_password_submission_event_); |
} |