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 67eee851ec69cce2fd254999c2e19c30b2c11f66..44bf48c22631c54de6f0a04198a29d07f92007f0 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( |
@@ -193,15 +193,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_); |
} |