OLD | NEW |
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 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
960 layout->AddView(current_profile_accounts); | 960 layout->AddView(current_profile_accounts); |
961 } | 961 } |
962 | 962 |
963 if (browser_->profile()->IsSupervised()) { | 963 if (browser_->profile()->IsSupervised()) { |
964 layout->StartRow(0, 0); | 964 layout->StartRow(0, 0); |
965 layout->AddView(new views::Separator(views::Separator::HORIZONTAL)); | 965 layout->AddView(new views::Separator(views::Separator::HORIZONTAL)); |
966 layout->StartRow(1, 0); | 966 layout->StartRow(1, 0); |
967 layout->AddView(CreateSupervisedUserDisclaimerView()); | 967 layout->AddView(CreateSupervisedUserDisclaimerView()); |
968 } | 968 } |
969 | 969 |
970 if (IsProfileChooser(view_mode_)) { | |
971 layout->StartRow(1, 0); | |
972 if (switches::IsFastUserSwitching()) { | |
973 layout->AddView(CreateOtherProfilesView(other_profiles)); | |
974 } | |
975 } | |
976 | |
977 layout->StartRow(0, 0); | 970 layout->StartRow(0, 0); |
978 layout->AddView(new views::Separator(views::Separator::HORIZONTAL)); | 971 layout->AddView(new views::Separator(views::Separator::HORIZONTAL)); |
979 | 972 |
980 if (option_buttons_view) { | 973 if (option_buttons_view) { |
981 layout->StartRow(0, 0); | 974 layout->StartRow(0, 0); |
982 layout->AddView(option_buttons_view); | 975 layout->AddView(option_buttons_view); |
983 } | 976 } |
984 } | 977 } |
985 | 978 |
986 void ProfileChooserView::PopulateMinimalProfileChooserView( | 979 void ProfileChooserView::PopulateMinimalProfileChooserView( |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1704 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != | 1697 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != |
1705 IncognitoModePrefs::DISABLED; | 1698 IncognitoModePrefs::DISABLED; |
1706 return incognito_available && !browser_->profile()->IsGuestSession(); | 1699 return incognito_available && !browser_->profile()->IsGuestSession(); |
1707 } | 1700 } |
1708 | 1701 |
1709 void ProfileChooserView::PostActionPerformed( | 1702 void ProfileChooserView::PostActionPerformed( |
1710 ProfileMetrics::ProfileDesktopMenu action_performed) { | 1703 ProfileMetrics::ProfileDesktopMenu action_performed) { |
1711 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); | 1704 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); |
1712 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; | 1705 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; |
1713 } | 1706 } |
OLD | NEW |