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 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
880 // Separate items into active and alternatives. | 880 // Separate items into active and alternatives. |
881 Indexes other_profiles; | 881 Indexes other_profiles; |
882 views::View* tutorial_view = NULL; | 882 views::View* tutorial_view = NULL; |
883 views::View* current_profile_view = NULL; | 883 views::View* current_profile_view = NULL; |
884 views::View* current_profile_accounts = NULL; | 884 views::View* current_profile_accounts = NULL; |
885 views::View* option_buttons_view = NULL; | 885 views::View* option_buttons_view = NULL; |
886 for (size_t i = 0; i < avatar_menu->GetNumberOfItems(); ++i) { | 886 for (size_t i = 0; i < avatar_menu->GetNumberOfItems(); ++i) { |
887 const AvatarMenu::Item& item = avatar_menu->GetItemAt(i); | 887 const AvatarMenu::Item& item = avatar_menu->GetItemAt(i); |
888 if (item.active) { | 888 if (item.active) { |
889 option_buttons_view = CreateOptionsView( | 889 option_buttons_view = CreateOptionsView( |
890 switches::IsNewProfileManagement() && item.signed_in); | 890 item.signed_in && profiles::IsLockAvailable(browser_->profile())); |
891 current_profile_view = CreateCurrentProfileView(item, false); | 891 current_profile_view = CreateCurrentProfileView(item, false); |
892 if (view_mode_ == profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER) { | 892 if (view_mode_ == profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER) { |
893 switch (tutorial_mode_) { | 893 switch (tutorial_mode_) { |
894 case profiles::TUTORIAL_MODE_NONE: | 894 case profiles::TUTORIAL_MODE_NONE: |
895 case profiles::TUTORIAL_MODE_WELCOME_UPGRADE: | 895 case profiles::TUTORIAL_MODE_WELCOME_UPGRADE: |
896 tutorial_view = CreateWelcomeUpgradeTutorialViewIfNeeded( | 896 tutorial_view = CreateWelcomeUpgradeTutorialViewIfNeeded( |
897 tutorial_mode_ == profiles::TUTORIAL_MODE_WELCOME_UPGRADE, | 897 tutorial_mode_ == profiles::TUTORIAL_MODE_WELCOME_UPGRADE, |
898 item); | 898 item); |
899 break; | 899 break; |
900 case profiles::TUTORIAL_MODE_CONFIRM_SIGNIN: | 900 case profiles::TUTORIAL_MODE_CONFIRM_SIGNIN: |
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1638 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != | 1638 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != |
1639 IncognitoModePrefs::DISABLED; | 1639 IncognitoModePrefs::DISABLED; |
1640 return incognito_available && !browser_->profile()->IsGuestSession(); | 1640 return incognito_available && !browser_->profile()->IsGuestSession(); |
1641 } | 1641 } |
1642 | 1642 |
1643 void ProfileChooserView::PostActionPerformed( | 1643 void ProfileChooserView::PostActionPerformed( |
1644 ProfileMetrics::ProfileDesktopMenu action_performed) { | 1644 ProfileMetrics::ProfileDesktopMenu action_performed) { |
1645 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); | 1645 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); |
1646 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; | 1646 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; |
1647 } | 1647 } |
OLD | NEW |