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

Side by Side Diff: chrome/browser/ui/views/profiles/profile_chooser_view.cc

Issue 338093004: New avatar menu cleanup: Move supervised user disclaimer into appropriate position. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h" 5 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/lifetime/application_lifetime.h" 10 #include "chrome/browser/lifetime/application_lifetime.h"
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 857
858 if (!current_profile_view) { 858 if (!current_profile_view) {
859 // Guest windows don't have an active profile. 859 // Guest windows don't have an active profile.
860 current_profile_view = CreateGuestProfileView(); 860 current_profile_view = CreateGuestProfileView();
861 option_buttons_view = CreateOptionsView(false); 861 option_buttons_view = CreateOptionsView(false);
862 } 862 }
863 863
864 layout->StartRow(1, 0); 864 layout->StartRow(1, 0);
865 layout->AddView(current_profile_view); 865 layout->AddView(current_profile_view);
866 866
867 if (view_mode_ != profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER) {
868 DCHECK(current_profile_accounts);
869 layout->StartRow(0, 0);
870 layout->AddView(new views::Separator(views::Separator::HORIZONTAL));
871 layout->StartRow(1, 0);
872 layout->AddView(current_profile_accounts);
873 }
874
867 if (browser_->profile()->IsSupervised()) { 875 if (browser_->profile()->IsSupervised()) {
868 layout->StartRow(0, 0); 876 layout->StartRow(0, 0);
869 layout->AddView(new views::Separator(views::Separator::HORIZONTAL)); 877 layout->AddView(new views::Separator(views::Separator::HORIZONTAL));
870 layout->StartRow(1, 0); 878 layout->StartRow(1, 0);
871 layout->AddView(CreateSupervisedUserDisclaimerView()); 879 layout->AddView(CreateSupervisedUserDisclaimerView());
872 } 880 }
873 881
874 if (view_mode_ == profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER) { 882 if (view_mode_ == profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER) {
875 layout->StartRow(1, 0); 883 layout->StartRow(1, 0);
876 if (switches::IsFastUserSwitching()) 884 if (switches::IsFastUserSwitching())
877 layout->AddView(CreateOtherProfilesView(other_profiles)); 885 layout->AddView(CreateOtherProfilesView(other_profiles));
878 } else {
879 DCHECK(current_profile_accounts);
880 layout->StartRow(0, 0);
881 layout->AddView(new views::Separator(views::Separator::HORIZONTAL));
882 layout->StartRow(1, 0);
883 layout->AddView(current_profile_accounts);
884 } 886 }
885 887
886 layout->StartRow(0, 0); 888 layout->StartRow(0, 0);
887 layout->AddView(new views::Separator(views::Separator::HORIZONTAL)); 889 layout->AddView(new views::Separator(views::Separator::HORIZONTAL));
888 890
889 // Option buttons. Only available with the new profile management flag. 891 // Option buttons. Only available with the new profile management flag.
890 if (option_buttons_view) { 892 if (option_buttons_view) {
891 layout->StartRow(0, 0); 893 layout->StartRow(0, 0);
892 layout->AddView(option_buttons_view); 894 layout->AddView(option_buttons_view);
893 } 895 }
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 layout->StartRowWithPadding( 1494 layout->StartRowWithPadding(
1493 1, 0, 0, views::kUnrelatedControlVerticalSpacing); 1495 1, 0, 0, views::kUnrelatedControlVerticalSpacing);
1494 layout->AddView(end_preview_and_relaunch_button_); 1496 layout->AddView(end_preview_and_relaunch_button_);
1495 1497
1496 TitleCard* title_card = new TitleCard( 1498 TitleCard* title_card = new TitleCard(
1497 IDS_PROFILES_END_PREVIEW, this, &end_preview_cancel_button_); 1499 IDS_PROFILES_END_PREVIEW, this, &end_preview_cancel_button_);
1498 return TitleCard::AddPaddedTitleCard( 1500 return TitleCard::AddPaddedTitleCard(
1499 view, title_card, kFixedAccountRemovalViewWidth); 1501 view, title_card, kFixedAccountRemovalViewWidth);
1500 } 1502 }
1501 1503
OLDNEW
« 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