Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Unified Diff: chrome/browser/ui/passwords/manage_passwords_ui_controller.cc

Issue 1416633010: Fix crash on a page navigation when Update Password bubble is active. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed DCHECK adding Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/passwords/manage_passwords_ui_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3a90b291df22fb5742b699529ebd09b0ee4418a2..ab3178ab5c3bc00e3d3f00fa68dab67088c531c0 100644
--- a/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc
@@ -388,6 +388,11 @@ void ManagePasswordsUIController::OnNopeUpdateClicked() {
}
void ManagePasswordsUIController::OnNoInteractionOnUpdate() {
+ if (state() != password_manager::ui::PENDING_PASSWORD_UPDATE_STATE) {
+ // Do nothing if the state was changed. It can happen for example when the
+ // update bubble is active and a page navigation happens.
+ return;
+ }
password_manager::PasswordFormManager* form_manager =
passwords_data_.form_manager();
DCHECK(form_manager);
« no previous file with comments | « no previous file | chrome/browser/ui/passwords/manage_passwords_ui_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698