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

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

Issue 952023002: Credential Manager API: pop up the new "Manage accounts" bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix the test 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/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 8fbc3876b1662842a2ba209025e283eb171c09cb..6bfece7f18862c5704c1ee453701bb69516d6d1c 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
+++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
@@ -270,8 +270,6 @@ ManagePasswordsBubbleView::AutoSigninView::AutoSigninView(
CredentialsItemView::AUTO_SIGNIN,
parent_->model()->GetProfile()->GetRequestContext());
AddChildView(credential);
- // TODO(vasilii): enable the button to switch to the "Managed" state.
- credential->SetEnabled(false);
parent_->set_initially_focused_view(credential);
timer_.Start(FROM_HERE, base::TimeDelta::FromSeconds(kAutoSigninToastTimeout),
@@ -280,7 +278,8 @@ ManagePasswordsBubbleView::AutoSigninView::AutoSigninView(
void ManagePasswordsBubbleView::AutoSigninView::ButtonPressed(
views::Button* sender, const ui::Event& event) {
- // TODO(vasilii): close the toast and switch to the "Managed" state.
+ parent_->model()->OnAutoSignInClicked();
+ parent_->Close();
}
void ManagePasswordsBubbleView::AutoSigninView::OnTimer() {
@@ -997,7 +996,10 @@ void ManagePasswordsBubbleView::Refresh() {
} else if (model()->state() == password_manager::ui::AUTO_SIGNIN_STATE) {
AddChildView(new AutoSigninView(this));
} else {
- AddChildView(new ManageView(this));
+ if (model()->IsNewUIActive())
+ AddChildView(new ManageAccountsView(this));
+ else
+ AddChildView(new ManageView(this));
}
GetLayoutManager()->Layout(this);
}

Powered by Google App Engine
This is Rietveld 408576698