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

Unified Diff: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc

Issue 775843005: Moving member never_save_password of ManagePasswordsBubbleView to ManagePasswordsBubbleModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
index cdf8ba66f1219bc1a3f14764017595d5c9d3a438..d77f62e7bd863afc1c3f6f8b77a46b646d4e4674 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
+++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
@@ -375,16 +375,7 @@ ManagePasswordsBubbleView::ConfirmNeverView::ConfirmNeverView(
// Title row.
BuildColumnSet(layout, SINGLE_VIEW_COLUMN_SET);
- views::Label* title_label = new views::Label(l10n_util::GetStringUTF16(
- IDS_MANAGE_PASSWORDS_BLACKLIST_CONFIRMATION_TITLE));
- title_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- title_label->SetMultiLine(true);
- title_label->SetFontList(ui::ResourceBundle::GetSharedInstance().GetFontList(
- ui::ResourceBundle::MediumFont));
- layout->StartRowWithPadding(
- 0, SINGLE_VIEW_COLUMN_SET, 0, views::kRelatedControlSmallVerticalSpacing);
- layout->AddView(title_label);
- layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing);
+ AddTitleRow(layout, parent_->model());
// Confirmation text.
views::Label* confirmation = new views::Label(l10n_util::GetStringUTF16(
@@ -835,7 +826,6 @@ ManagePasswordsBubbleView::ManagePasswordsBubbleView(
anchor_view ? views::BubbleBorder::TOP_RIGHT
: views::BubbleBorder::NONE),
anchor_view_(anchor_view),
- never_save_passwords_(false),
initially_focused_view_(NULL) {
// Compensate for built-in vertical padding in the anchor view's image.
set_anchor_view_insets(gfx::Insets(5, 0, 5, 0));
@@ -879,7 +869,7 @@ void ManagePasswordsBubbleView::Refresh() {
RemoveAllChildViews(true);
initially_focused_view_ = NULL;
if (password_manager::ui::IsPendingState(model()->state())) {
- if (never_save_passwords_)
+ if (model()->never_save_passwords())
AddChildView(new ConfirmNeverView(this));
else
AddChildView(new PendingView(this));
@@ -900,7 +890,7 @@ void ManagePasswordsBubbleView::NotifyNeverForThisSiteClicked() {
// Skip confirmation if there are no existing passwords for this site.
NotifyConfirmedNeverForThisSite();
} else {
- never_save_passwords_ = true;
+ model()->OnConfirmationForNeverForThisSite();
Refresh();
}
}
@@ -911,7 +901,7 @@ void ManagePasswordsBubbleView::NotifyConfirmedNeverForThisSite() {
}
void ManagePasswordsBubbleView::NotifyUndoNeverForThisSite() {
- never_save_passwords_ = false;
+ model()->OnUndoNeverForThisSite();
Refresh();
}
« no previous file with comments | « chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698