diff options
author | Vasilii Sukhanov <vasilii@chromium.org> | 2015-11-02 10:58:20 +0100 |
---|---|---|
committer | Vasilii Sukhanov <vasilii@chromium.org> | 2015-11-02 10:00:08 +0000 |
commit | c5fe2062b2dcaa84c59d6ac86e2e98720ec403f0 (patch) | |
tree | d0a232d9a97e13421af22dd914d62ea2647b3a2a | |
parent | 43e5f07e7ed27eaab5379d13c0b2f5ca21eaf44d (diff) | |
download | chromium_src-c5fe2062b2dcaa84c59d6ac86e2e98720ec403f0.zip chromium_src-c5fe2062b2dcaa84c59d6ac86e2e98720ec403f0.tar.gz chromium_src-c5fe2062b2dcaa84c59d6ac86e2e98720ec403f0.tar.bz2 |
Revert "[Password Manager] Implement ShouldShowMultipleAccountUpdateUI in ManagePasswordUIController"
This reverts commit ffd0821d720e641bce612a25455e9e0a16c82909.
https://codereview.chromium.org/1311833004
The reason for revert:
- it causes a crash
- the logic can't belong to ManagePasswordsUIController. The class is responsible for showing the UI only.
BUG=548623, 359315
Review URL: https://codereview.chromium.org/1428793003
Cr-Commit-Position: refs/heads/master@{#356904}
(cherry picked from commit f55367fdcb55b328008d50a932c3822e9fc8497e)
Review URL: https://codereview.chromium.org/1410523005 .
Cr-Commit-Position: refs/branch-heads/2526@{#291}
Cr-Branched-From: cb947c0153db0ec02a8abbcb3ca086d88bf6006f-refs/heads/master@{#352221}
3 files changed, 2 insertions, 12 deletions
diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc b/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc index 4ae9f87..7f142bb 100644 --- a/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc +++ b/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc @@ -346,9 +346,8 @@ Profile* ManagePasswordsBubbleModel::GetProfile() const { } bool ManagePasswordsBubbleModel::ShouldShowMultipleAccountUpdateUI() const { - ManagePasswordsUIController* controller = - ManagePasswordsUIController::FromWebContents(web_contents()); - return controller->ShouldShowMultipleAccountUpdateUI(); + return state_ == password_manager::ui::PENDING_PASSWORD_UPDATE_STATE && + local_credentials_.size() > 1 && !password_overridden_; } bool ManagePasswordsBubbleModel::ShouldShowGoogleSmartLockWelcome() const { diff --git a/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc b/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc index c629f5b..636fd19 100644 --- a/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc +++ b/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc @@ -419,11 +419,6 @@ void ManagePasswordsUIController::ShowBubbleWithoutUserInteraction() { #endif } -bool ManagePasswordsUIController::ShouldShowMultipleAccountUpdateUI() const { - return state() == password_manager::ui::PENDING_PASSWORD_UPDATE_STATE && - GetCurrentForms().size() > 1 && !PasswordOverridden(); -} - void ManagePasswordsUIController::WebContentsDestroyed() { password_manager::PasswordStore* password_store = GetPasswordStore(web_contents()); diff --git a/chrome/browser/ui/passwords/manage_passwords_ui_controller.h b/chrome/browser/ui/passwords/manage_passwords_ui_controller.h index d499101..1c7b9e0 100644 --- a/chrome/browser/ui/passwords/manage_passwords_ui_controller.h +++ b/chrome/browser/ui/passwords/manage_passwords_ui_controller.h @@ -157,10 +157,6 @@ class ManagePasswordsUIController // newly submitted form the password is different from stored one. bool PasswordOverridden() const; - // Returns true if the multiple account selection prompt for account update - // should be presented. - bool ShouldShowMultipleAccountUpdateUI() const; - protected: explicit ManagePasswordsUIController( content::WebContents* web_contents); |