OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/user_manager_impl.h" | 5 #include "chrome/browser/chromeos/login/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 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1510 command_line->AppendSwitch( | 1510 command_line->AppendSwitch( |
1511 wm::switches::kWindowAnimationsDisabled); | 1511 wm::switches::kWindowAnimationsDisabled); |
1512 } | 1512 } |
1513 | 1513 |
1514 void UserManagerImpl::DemoAccountLoggedIn() { | 1514 void UserManagerImpl::DemoAccountLoggedIn() { |
1515 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1515 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
1516 active_user_ = User::CreateKioskAppUser(DemoAppLauncher::kDemoUserName); | 1516 active_user_ = User::CreateKioskAppUser(DemoAppLauncher::kDemoUserName); |
1517 active_user_->SetStubImage(User::kInvalidImageIndex, false); | 1517 active_user_->SetStubImage(User::kInvalidImageIndex, false); |
1518 WallpaperManager::Get()->SetUserWallpaperNow(DemoAppLauncher::kDemoUserName); | 1518 WallpaperManager::Get()->SetUserWallpaperNow(DemoAppLauncher::kDemoUserName); |
1519 | 1519 |
| 1520 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 1521 command_line->AppendSwitch(::switches::kForceAppMode); |
| 1522 command_line->AppendSwitchASCII(::switches::kAppId, |
| 1523 DemoAppLauncher::kDemoAppId); |
| 1524 |
1520 // Disable window animation since the demo app runs in a single full screen | 1525 // Disable window animation since the demo app runs in a single full screen |
1521 // window and window animation causes start-up janks. | 1526 // window and window animation causes start-up janks. |
1522 CommandLine::ForCurrentProcess()->AppendSwitch( | 1527 CommandLine::ForCurrentProcess()->AppendSwitch( |
1523 wm::switches::kWindowAnimationsDisabled); | 1528 wm::switches::kWindowAnimationsDisabled); |
1524 } | 1529 } |
1525 | 1530 |
1526 void UserManagerImpl::RetailModeUserLoggedIn() { | 1531 void UserManagerImpl::RetailModeUserLoggedIn() { |
1527 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1532 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
1528 is_current_user_new_ = true; | 1533 is_current_user_new_ = true; |
1529 active_user_ = User::CreateRetailModeUser(); | 1534 active_user_ = User::CreateRetailModeUser(); |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2080 } | 2085 } |
2081 | 2086 |
2082 void UserManagerImpl::DeleteUser(User* user) { | 2087 void UserManagerImpl::DeleteUser(User* user) { |
2083 const bool is_active_user = (user == active_user_); | 2088 const bool is_active_user = (user == active_user_); |
2084 delete user; | 2089 delete user; |
2085 if (is_active_user) | 2090 if (is_active_user) |
2086 active_user_ = NULL; | 2091 active_user_ = NULL; |
2087 } | 2092 } |
2088 | 2093 |
2089 } // namespace chromeos | 2094 } // namespace chromeos |
OLD | NEW |