Chromium Code Reviews| 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 9aa06e8b731cb147e8946c99c873675f4797d8db..2a33e40c0f93c68833eab23d4cbc4ccf32018df9 100644 |
| --- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
| +++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
| @@ -1494,6 +1494,8 @@ views::View* ProfileChooserView::CreateSyncErrorViewIfNeeded() { |
| case sync_ui_util::UNRECOVERABLE_ERROR: |
| button_out = &sync_error_signin_again_button_; |
| break; |
| + case sync_ui_util::SUPERVISED_USER_AUTH_ERROR: |
| + break; |
| case sync_ui_util::AUTH_ERROR: |
| button_out = &sync_error_signin_button_; |
| break; |
| @@ -1553,20 +1555,22 @@ views::View* ProfileChooserView::CreateSyncErrorView( |
| content_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| vertical_view->AddChildView(content_label); |
| - // Adds a padding row between error title/content and the button. |
| - SizedContainer* padding = |
| - new SizedContainer(gfx::Size(0, views::kRelatedControlVerticalSpacing)); |
| - vertical_view->AddChildView(padding); |
| - |
| // Adds an action button. |
| - *button_out = views::MdTextButton::CreateSecondaryUiBlueButton( |
| - this, l10n_util::GetStringUTF16(button_string_id)); |
| - vertical_view->AddChildView(*button_out); |
| - |
| - view->AddChildView(vertical_view); |
| - view->SetBorder(views::Border::CreateEmptyBorder( |
| + if (button_string_id) { |
| + DCHECK(button_out); |
| + // Adds a padding row between error title/content and the button. |
| + SizedContainer* padding = |
| + new SizedContainer(gfx::Size(0, views::kRelatedControlVerticalSpacing)); |
| + vertical_view->AddChildView(padding); |
| + |
| + *button_out = views::MdTextButton::CreateSecondaryUiBlueButton( |
| + this, l10n_util::GetStringUTF16(button_string_id)); |
| + vertical_view->AddChildView(*button_out); |
| + view->SetBorder(views::Border::CreateEmptyBorder( |
| 0, 0, views::kRelatedControlSmallVerticalSpacing, 0)); |
| + } |
|
sky
2016/08/22 20:43:22
Can you set button_out to null in the else case to
Jane
2016/08/22 21:05:15
Done.
|
| + view->AddChildView(vertical_view); |
| return view; |
| } |