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

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

Issue 2267013002: [MD User Menu] New way to handle supervised user auth error (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm ('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/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;
}
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698