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

Unified Diff: chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_manage_view_controller.mm

Issue 1009953002: Integrate ManagePasswordsState into ManagePasswordsUIController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_manage_view_controller.mm
diff --git a/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_manage_view_controller.mm b/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_manage_view_controller.mm
index 3a3a771acd5118b39d82d5e9494b35f452ee13e0..2c42e592b5ede78b7baf8034ad467075f2f1ef8b 100644
--- a/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_manage_view_controller.mm
+++ b/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_manage_view_controller.mm
@@ -27,13 +27,12 @@ using namespace password_manager::mac::ui;
const CGFloat curX = 0;
CGFloat maxX = 0;
CGFloat curY = 0;
- for (autofill::ConstPasswordFormMap::const_reverse_iterator i =
- model->best_matches().rbegin();
- i != model->best_matches().rend();
+ for (auto i = model->local_credentials().rbegin();
+ i != model->local_credentials().rend();
++i) {
- autofill::PasswordForm form = *i->second;
+ const autofill::PasswordForm& form = **i;
password_manager::ui::PasswordItemPosition position =
- (&(*i) == &(*model->best_matches().begin()))
+ (&(*i) == &(*model->local_credentials().begin()))
? password_manager::ui::FIRST_ITEM
: password_manager::ui::SUBSEQUENT_ITEM;
base::scoped_nsobject<ManagePasswordItemViewController> item(
@@ -123,7 +122,7 @@ using namespace password_manager::mac::ui;
// Content. If we have a list of passwords to store for the current site, we
// display them to the user for management. Otherwise, we show a "No passwords
// for this site" message.
- if (model_->best_matches().empty()) {
+ if (model_->local_credentials().empty()) {
const CGFloat noPasswordsWidth = std::max(
kDesiredBubbleWidth - 2 * kFramePadding, NSWidth([titleLabel frame]));
contentView_.reset(

Powered by Google App Engine
This is Rietveld 408576698