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

Side by Side Diff: chrome/browser/chromeos/login/user_manager_impl.cc

Issue 256633002: cros: Fix demo app could bring up CCD. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 months 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/login/demo_mode/demo_app_launcher_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/demo_mode/demo_app_launcher_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698