Index: chrome/browser/ui/passwords/manage_passwords_ui_controller.cc |
diff --git a/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc b/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc |
index 9cbd290acd9104a80c772839c5873e83ea466cb8..89c4c8a9944406f3fee6b8c8de24dea6ad6b9491 100644 |
--- a/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc |
+++ b/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc |
@@ -171,10 +171,19 @@ void ManagePasswordsUIController::UnblacklistSite() { |
void ManagePasswordsUIController::DidNavigateMainFrame( |
const content::LoadCommittedDetails& details, |
const content::FrameNavigateParams& params) { |
+ // Don't react to in-page (fragment) navigations. |
if (details.is_in_page) |
return; |
+ |
+ // Don't do anything if a navigation occurs before a user could reasonably |
+ // interact with the password bubble. |
+ if (timer_ && timer_->Elapsed() < base::TimeDelta::FromSeconds(1)) |
+ return; |
+ |
+ // Otherwise, reset the password manager and the timer. |
state_ = password_manager::ui::INACTIVE_STATE; |
UpdateBubbleAndIconVisibility(); |
+ timer_.reset(new base::ElapsedTimer()); |
} |
const autofill::PasswordForm& ManagePasswordsUIController:: |