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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_ui_controller.cc

Issue 1311833004: [Password Manager] Implement ShouldShowMultipleAccountUpdateUI in ManagePasswordUIController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove check Created 5 years, 3 months 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/passwords/manage_passwords_ui_controller.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/passwords/manage_passwords_ui_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698