| OLD | NEW | 
|    1 // Copyright 2014 The Chromium Authors. All rights reserved. |    1 // Copyright 2014 The Chromium Authors. All rights reserved. | 
|    2 // Use of this source code is governed by a BSD-style license that can be |    2 // Use of this source code is governed by a BSD-style license that can be | 
|    3 // found in the LICENSE file. |    3 // found in the LICENSE file. | 
|    4  |    4  | 
|    5 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" |    5 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" | 
|    6  |    6  | 
|    7 #include "base/auto_reset.h" |    7 #include "base/auto_reset.h" | 
|    8 #include "chrome/app/chrome_command_ids.h" |    8 #include "chrome/app/chrome_command_ids.h" | 
|    9 #include "chrome/browser/browsing_data/browsing_data_helper.h" |    9 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 
|   10 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |   10 #include "chrome/browser/password_manager/chrome_password_manager_client.h" | 
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  376 #if !defined(OS_ANDROID) |  376 #if !defined(OS_ANDROID) | 
|  377   Browser* browser = chrome::FindBrowserWithWebContents(web_contents()); |  377   Browser* browser = chrome::FindBrowserWithWebContents(web_contents()); | 
|  378   if (!browser || browser->toolbar_model()->input_in_progress()) |  378   if (!browser || browser->toolbar_model()->input_in_progress()) | 
|  379     return; |  379     return; | 
|  380  |  380  | 
|  381   CommandUpdater* updater = browser->command_controller()->command_updater(); |  381   CommandUpdater* updater = browser->command_controller()->command_updater(); | 
|  382   updater->ExecuteCommand(IDC_MANAGE_PASSWORDS_FOR_PAGE); |  382   updater->ExecuteCommand(IDC_MANAGE_PASSWORDS_FOR_PAGE); | 
|  383 #endif |  383 #endif | 
|  384 } |  384 } | 
|  385  |  385  | 
 |  386 bool ManagePasswordsUIController::ShouldShowMultipleAccountUpdateUI() const { | 
 |  387   return state() == password_manager::ui::PENDING_PASSWORD_UPDATE_STATE && | 
 |  388          GetCurrentForms().size() > 1 && !PasswordOverridden(); | 
 |  389 } | 
 |  390  | 
|  386 void ManagePasswordsUIController::WebContentsDestroyed() { |  391 void ManagePasswordsUIController::WebContentsDestroyed() { | 
|  387   password_manager::PasswordStore* password_store = |  392   password_manager::PasswordStore* password_store = | 
|  388       GetPasswordStore(web_contents()); |  393       GetPasswordStore(web_contents()); | 
|  389   if (password_store) |  394   if (password_store) | 
|  390     password_store->RemoveObserver(this); |  395     password_store->RemoveObserver(this); | 
|  391 } |  396 } | 
| OLD | NEW |