| 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/chromeos/login/users/chrome_user_manager_impl.h" | 5 #include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "ash/multi_profile_uma.h" | 10 #include "ash/multi_profile_uma.h" |
| (...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 command_line->AppendSwitch(::switches::kForceAppMode); | 747 command_line->AppendSwitch(::switches::kForceAppMode); |
| 748 command_line->AppendSwitchASCII(::switches::kAppId, | 748 command_line->AppendSwitchASCII(::switches::kAppId, |
| 749 DemoAppLauncher::kDemoAppId); | 749 DemoAppLauncher::kDemoAppId); |
| 750 | 750 |
| 751 // Disable window animation since the demo app runs in a single full screen | 751 // Disable window animation since the demo app runs in a single full screen |
| 752 // window and window animation causes start-up janks. | 752 // window and window animation causes start-up janks. |
| 753 CommandLine::ForCurrentProcess()->AppendSwitch( | 753 CommandLine::ForCurrentProcess()->AppendSwitch( |
| 754 wm::switches::kWindowAnimationsDisabled); | 754 wm::switches::kWindowAnimationsDisabled); |
| 755 } | 755 } |
| 756 | 756 |
| 757 void ChromeUserManagerImpl::RetailModeUserLoggedIn() { | |
| 758 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | |
| 759 SetIsCurrentUserNew(true); | |
| 760 active_user_ = user_manager::User::CreateRetailModeUser(); | |
| 761 GetUserImageManager(chromeos::login::kRetailModeUserName) | |
| 762 ->UserLoggedIn(IsCurrentUserNew(), true); | |
| 763 WallpaperManager::Get()->SetUserWallpaperNow( | |
| 764 chromeos::login::kRetailModeUserName); | |
| 765 } | |
| 766 | |
| 767 void ChromeUserManagerImpl::NotifyOnLogin() { | 757 void ChromeUserManagerImpl::NotifyOnLogin() { |
| 768 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 758 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 769 | 759 |
| 770 UserSessionManager::OverrideHomedir(); | 760 UserSessionManager::OverrideHomedir(); |
| 771 UpdateNumberOfUsers(); | 761 UpdateNumberOfUsers(); |
| 772 | 762 |
| 773 ChromeUserManager::NotifyOnLogin(); | 763 ChromeUserManager::NotifyOnLogin(); |
| 774 | 764 |
| 775 // TODO(nkostylev): Deprecate this notification in favor of | 765 // TODO(nkostylev): Deprecate this notification in favor of |
| 776 // ActiveUserChanged() observer call. | 766 // ActiveUserChanged() observer call. |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1031 if ((users + GetUsersAdmittedForMultiProfile().size()) > 1) | 1021 if ((users + GetUsersAdmittedForMultiProfile().size()) > 1) |
| 1032 ash::MultiProfileUMA::RecordUserCount(users); | 1022 ash::MultiProfileUMA::RecordUserCount(users); |
| 1033 } | 1023 } |
| 1034 | 1024 |
| 1035 base::debug::SetCrashKeyValue( | 1025 base::debug::SetCrashKeyValue( |
| 1036 crash_keys::kNumberOfUsers, | 1026 crash_keys::kNumberOfUsers, |
| 1037 base::StringPrintf("%" PRIuS, GetLoggedInUsers().size())); | 1027 base::StringPrintf("%" PRIuS, GetLoggedInUsers().size())); |
| 1038 } | 1028 } |
| 1039 | 1029 |
| 1040 } // namespace chromeos | 1030 } // namespace chromeos |
| OLD | NEW |