| 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 1484 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1495     NOTREACHED(); |  1495     NOTREACHED(); | 
|  1496   } |  1496   } | 
|  1497  |  1497  | 
|  1498   CommandLine* command_line = CommandLine::ForCurrentProcess(); |  1498   CommandLine* command_line = CommandLine::ForCurrentProcess(); | 
|  1499   command_line->AppendSwitch(::switches::kForceAppMode); |  1499   command_line->AppendSwitch(::switches::kForceAppMode); | 
|  1500   command_line->AppendSwitchASCII(::switches::kAppId, kiosk_app_id); |  1500   command_line->AppendSwitchASCII(::switches::kAppId, kiosk_app_id); | 
|  1501  |  1501  | 
|  1502   // Disable window animation since kiosk app runs in a single full screen |  1502   // Disable window animation since kiosk app runs in a single full screen | 
|  1503   // window and window animation causes start-up janks. |  1503   // window and window animation causes start-up janks. | 
|  1504   command_line->AppendSwitch( |  1504   command_line->AppendSwitch( | 
|  1505       views::corewm::switches::kWindowAnimationsDisabled); |  1505       wm::switches::kWindowAnimationsDisabled); | 
|  1506 } |  1506 } | 
|  1507  |  1507  | 
|  1508 void UserManagerImpl::DemoAccountLoggedIn() { |  1508 void UserManagerImpl::DemoAccountLoggedIn() { | 
|  1509   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |  1509   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 
|  1510   active_user_ = User::CreateKioskAppUser(DemoAppLauncher::kDemoUserName); |  1510   active_user_ = User::CreateKioskAppUser(DemoAppLauncher::kDemoUserName); | 
|  1511   active_user_->SetStubImage(User::kInvalidImageIndex, false); |  1511   active_user_->SetStubImage(User::kInvalidImageIndex, false); | 
|  1512   WallpaperManager::Get()->SetUserWallpaperNow(DemoAppLauncher::kDemoUserName); |  1512   WallpaperManager::Get()->SetUserWallpaperNow(DemoAppLauncher::kDemoUserName); | 
|  1513  |  1513  | 
|  1514   // Disable window animation since the demo app runs in a single full screen |  1514   // Disable window animation since the demo app runs in a single full screen | 
|  1515   // window and window animation causes start-up janks. |  1515   // window and window animation causes start-up janks. | 
|  1516   CommandLine::ForCurrentProcess()->AppendSwitch( |  1516   CommandLine::ForCurrentProcess()->AppendSwitch( | 
|  1517       views::corewm::switches::kWindowAnimationsDisabled); |  1517       wm::switches::kWindowAnimationsDisabled); | 
|  1518 } |  1518 } | 
|  1519  |  1519  | 
|  1520 void UserManagerImpl::RetailModeUserLoggedIn() { |  1520 void UserManagerImpl::RetailModeUserLoggedIn() { | 
|  1521   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |  1521   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 
|  1522   is_current_user_new_ = true; |  1522   is_current_user_new_ = true; | 
|  1523   active_user_ = User::CreateRetailModeUser(); |  1523   active_user_ = User::CreateRetailModeUser(); | 
|  1524   GetUserImageManager(UserManager::kRetailModeUserName)->UserLoggedIn( |  1524   GetUserImageManager(UserManager::kRetailModeUserName)->UserLoggedIn( | 
|  1525       is_current_user_new_, |  1525       is_current_user_new_, | 
|  1526       true); |  1526       true); | 
|  1527   WallpaperManager::Get()->SetUserWallpaperNow( |  1527   WallpaperManager::Get()->SetUserWallpaperNow( | 
| (...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2074 } |  2074 } | 
|  2075  |  2075  | 
|  2076 void UserManagerImpl::DeleteUser(User* user) { |  2076 void UserManagerImpl::DeleteUser(User* user) { | 
|  2077   const bool is_active_user = (user == active_user_); |  2077   const bool is_active_user = (user == active_user_); | 
|  2078   delete user; |  2078   delete user; | 
|  2079   if (is_active_user) |  2079   if (is_active_user) | 
|  2080     active_user_ = NULL; |  2080     active_user_ = NULL; | 
|  2081 } |  2081 } | 
|  2082  |  2082  | 
|  2083 }  // namespace chromeos |  2083 }  // namespace chromeos | 
| OLD | NEW |