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

Unified Diff: chrome/browser/ui/views/profiles/profile_chooser_view.cc

Issue 2704303003: Linux/Windows: Crash in profile switcher menu with account consistency enabled (Closed)
Patch Set: Disable the button if no reauth required Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/profiles/profile_chooser_view.cc
diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
index 62702bafaa002d87581ca857030af1a37f487b39..8af320e51d9a69f0e6ca36ed4ae7753e7ec94a5d 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -195,6 +195,7 @@ class BackgroundColorHoverButton : public views::LabelButton {
#endif
title_(nullptr),
subtitle_(nullptr) {
+ DCHECK(profile_chooser_view);
SetImageLabelSpacing(switches::IsMaterialDesignUserMenu()
? (kMaterialMenuEdgeMargin - 2)
: views::kItemLabelSpacing);
@@ -2133,9 +2134,8 @@ void ProfileChooserView::CreateAccountButton(views::GridLayout* layout,
int available_width = width - 2 * views::kButtonHEdgeMarginNew -
kDeleteButtonWidth - warning_button_width;
views::LabelButton* email_button = new BackgroundColorHoverButton(
- reauth_required ? this : NULL,
- base::UTF8ToUTF16(email),
- warning_default_image);
+ this, base::UTF8ToUTF16(email), warning_default_image);
+ email_button->SetEnabled(reauth_required);
email_button->SetElideBehavior(gfx::ELIDE_EMAIL);
email_button->SetMinSize(gfx::Size(0, kButtonHeight));
email_button->SetMaxSize(gfx::Size(available_width, kButtonHeight));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698