| 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/about_flags.h" | 9 #include "chrome/browser/about_flags.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| 11 #include "chrome/browser/lifetime/application_lifetime.h" | 11 #include "chrome/browser/lifetime/application_lifetime.h" |
| 12 #include "chrome/browser/pref_service_flags_storage.h" | 12 #include "chrome/browser/pref_service_flags_storage.h" |
| 13 #include "chrome/browser/profiles/profile_avatar_icon_util.h" | 13 #include "chrome/browser/profiles/profile_avatar_icon_util.h" |
| 14 #include "chrome/browser/profiles/profile_info_cache.h" |
| 14 #include "chrome/browser/profiles/profile_manager.h" | 15 #include "chrome/browser/profiles/profile_manager.h" |
| 15 #include "chrome/browser/profiles/profile_window.h" | 16 #include "chrome/browser/profiles/profile_window.h" |
| 16 #include "chrome/browser/profiles/profiles_state.h" | 17 #include "chrome/browser/profiles/profiles_state.h" |
| 17 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 18 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| 18 #include "chrome/browser/signin/signin_manager_factory.h" | 19 #include "chrome/browser/signin/signin_manager_factory.h" |
| 19 #include "chrome/browser/signin/signin_promo.h" | 20 #include "chrome/browser/signin/signin_promo.h" |
| 20 #include "chrome/browser/ui/browser.h" | 21 #include "chrome/browser/ui/browser.h" |
| 21 #include "chrome/browser/ui/browser_dialogs.h" | 22 #include "chrome/browser/ui/browser_dialogs.h" |
| 22 #include "chrome/browser/ui/chrome_pages.h" | 23 #include "chrome/browser/ui/chrome_pages.h" |
| 23 #include "chrome/browser/ui/singleton_tabs.h" | 24 #include "chrome/browser/ui/singleton_tabs.h" |
| (...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 layout->StartRow(1, 0); | 897 layout->StartRow(1, 0); |
| 897 layout->SkipColumns(1); | 898 layout->SkipColumns(1); |
| 898 | 899 |
| 899 layout->StartRow(1, 0); | 900 layout->StartRow(1, 0); |
| 900 layout->SkipColumns(1); | 901 layout->SkipColumns(1); |
| 901 return view; | 902 return view; |
| 902 } | 903 } |
| 903 | 904 |
| 904 views::View* ProfileChooserView::CreateGuestProfileView() { | 905 views::View* ProfileChooserView::CreateGuestProfileView() { |
| 905 gfx::Image guest_icon = | 906 gfx::Image guest_icon = |
| 906 ui::ResourceBundle::GetSharedInstance().GetImageNamed(IDR_LOGIN_GUEST); | 907 ui::ResourceBundle::GetSharedInstance().GetImageNamed( |
| 908 profiles::GetPlaceholderAvatarIconResourceID()); |
| 907 AvatarMenu::Item guest_avatar_item(0, 0, guest_icon); | 909 AvatarMenu::Item guest_avatar_item(0, 0, guest_icon); |
| 908 guest_avatar_item.active = true; | 910 guest_avatar_item.active = true; |
| 909 guest_avatar_item.name = l10n_util::GetStringUTF16( | 911 guest_avatar_item.name = l10n_util::GetStringUTF16( |
| 910 IDS_PROFILES_GUEST_PROFILE_NAME); | 912 IDS_PROFILES_GUEST_PROFILE_NAME); |
| 911 guest_avatar_item.signed_in = false; | 913 guest_avatar_item.signed_in = false; |
| 912 | 914 |
| 913 return CreateCurrentProfileView(guest_avatar_item, true); | 915 return CreateCurrentProfileView(guest_avatar_item, true); |
| 914 } | 916 } |
| 915 | 917 |
| 916 views::View* ProfileChooserView::CreateOtherProfilesView( | 918 views::View* ProfileChooserView::CreateOtherProfilesView( |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1198 g_browser_process->local_state()); | 1200 g_browser_process->local_state()); |
| 1199 about_flags::SetExperimentEnabled( | 1201 about_flags::SetExperimentEnabled( |
| 1200 &flags_storage, | 1202 &flags_storage, |
| 1201 kNewProfileManagementExperimentInternalName, | 1203 kNewProfileManagementExperimentInternalName, |
| 1202 true); | 1204 true); |
| 1203 | 1205 |
| 1204 CommandLine::ForCurrentProcess()->AppendSwitch( | 1206 CommandLine::ForCurrentProcess()->AppendSwitch( |
| 1205 switches::kNewProfileManagement); | 1207 switches::kNewProfileManagement); |
| 1206 chrome::ShowUserManager(base::FilePath()); | 1208 chrome::ShowUserManager(base::FilePath()); |
| 1207 } | 1209 } |
| OLD | NEW |