Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc

Issue 608283003: Remove retail mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/bind.h" 10 #include "base/bind.h"
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 command_line->AppendSwitch(::switches::kForceAppMode); 791 command_line->AppendSwitch(::switches::kForceAppMode);
792 command_line->AppendSwitchASCII(::switches::kAppId, 792 command_line->AppendSwitchASCII(::switches::kAppId,
793 DemoAppLauncher::kDemoAppId); 793 DemoAppLauncher::kDemoAppId);
794 794
795 // Disable window animation since the demo app runs in a single full screen 795 // Disable window animation since the demo app runs in a single full screen
796 // window and window animation causes start-up janks. 796 // window and window animation causes start-up janks.
797 CommandLine::ForCurrentProcess()->AppendSwitch( 797 CommandLine::ForCurrentProcess()->AppendSwitch(
798 wm::switches::kWindowAnimationsDisabled); 798 wm::switches::kWindowAnimationsDisabled);
799 } 799 }
800 800
801 void ChromeUserManagerImpl::RetailModeUserLoggedIn() {
802 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
803 SetIsCurrentUserNew(true);
804 active_user_ = user_manager::User::CreateRetailModeUser();
805 GetUserImageManager(chromeos::login::kRetailModeUserName)
806 ->UserLoggedIn(IsCurrentUserNew(), true);
807 #if !defined(USE_ATHENA)
808 WallpaperManager::Get()->SetUserWallpaperNow(
809 chromeos::login::kRetailModeUserName);
810 #endif
811 }
812
813 void ChromeUserManagerImpl::NotifyOnLogin() { 801 void ChromeUserManagerImpl::NotifyOnLogin() {
814 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 802 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
815 803
816 UserSessionManager::OverrideHomedir(); 804 UserSessionManager::OverrideHomedir();
817 UpdateNumberOfUsers(); 805 UpdateNumberOfUsers();
818 806
819 ChromeUserManager::NotifyOnLogin(); 807 ChromeUserManager::NotifyOnLogin();
820 808
821 // TODO(nkostylev): Deprecate this notification in favor of 809 // TODO(nkostylev): Deprecate this notification in favor of
822 // ActiveUserChanged() observer call. 810 // ActiveUserChanged() observer call.
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 ash::MultiProfileUMA::RecordUserCount(users); 1071 ash::MultiProfileUMA::RecordUserCount(users);
1084 } 1072 }
1085 #endif 1073 #endif
1086 1074
1087 base::debug::SetCrashKeyValue( 1075 base::debug::SetCrashKeyValue(
1088 crash_keys::kNumberOfUsers, 1076 crash_keys::kNumberOfUsers,
1089 base::StringPrintf("%" PRIuS, GetLoggedInUsers().size())); 1077 base::StringPrintf("%" PRIuS, GetLoggedInUsers().size()));
1090 } 1078 }
1091 1079
1092 } // namespace chromeos 1080 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698