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 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
947 layout->AddView(current_profile_accounts); | 947 layout->AddView(current_profile_accounts); |
948 } | 948 } |
949 | 949 |
950 if (browser_->profile()->IsSupervised()) { | 950 if (browser_->profile()->IsSupervised()) { |
951 layout->StartRow(0, 0); | 951 layout->StartRow(0, 0); |
952 layout->AddView(new views::Separator(views::Separator::HORIZONTAL)); | 952 layout->AddView(new views::Separator(views::Separator::HORIZONTAL)); |
953 layout->StartRow(1, 0); | 953 layout->StartRow(1, 0); |
954 layout->AddView(CreateSupervisedUserDisclaimerView()); | 954 layout->AddView(CreateSupervisedUserDisclaimerView()); |
955 } | 955 } |
956 | 956 |
957 if (IsProfileChooser(view_mode_)) { | |
958 layout->StartRow(1, 0); | |
959 if (switches::IsFastUserSwitching()) { | |
960 layout->AddView(CreateOtherProfilesView(other_profiles)); | |
961 } | |
962 } | |
963 | |
964 layout->StartRow(0, 0); | 957 layout->StartRow(0, 0); |
965 layout->AddView(new views::Separator(views::Separator::HORIZONTAL)); | 958 layout->AddView(new views::Separator(views::Separator::HORIZONTAL)); |
966 | 959 |
967 if (option_buttons_view) { | 960 if (option_buttons_view) { |
968 layout->StartRow(0, 0); | 961 layout->StartRow(0, 0); |
969 layout->AddView(option_buttons_view); | 962 layout->AddView(option_buttons_view); |
970 } | 963 } |
971 } | 964 } |
972 | 965 |
973 void ProfileChooserView::PopulateMinimalProfileChooserView( | 966 void ProfileChooserView::PopulateMinimalProfileChooserView( |
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1728 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != | 1721 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != |
1729 IncognitoModePrefs::DISABLED; | 1722 IncognitoModePrefs::DISABLED; |
1730 return incognito_available && !browser_->profile()->IsGuestSession(); | 1723 return incognito_available && !browser_->profile()->IsGuestSession(); |
1731 } | 1724 } |
1732 | 1725 |
1733 void ProfileChooserView::PostActionPerformed( | 1726 void ProfileChooserView::PostActionPerformed( |
1734 ProfileMetrics::ProfileDesktopMenu action_performed) { | 1727 ProfileMetrics::ProfileDesktopMenu action_performed) { |
1735 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); | 1728 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); |
1736 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; | 1729 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; |
1737 } | 1730 } |
OLD | NEW |