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

Side by Side Diff: components/user_manager/user_manager_base.cc

Issue 2421323002: Created new account type for ARC++ kiosk. (Closed)
Patch Set: Rebase Created 4 years, 1 month 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
« no previous file with comments | « components/user_manager/user_manager_base.h ('k') | components/user_manager/user_type.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "components/user_manager/user_manager_base.h" 5 #include "components/user_manager/user_manager_base.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 bool UserManagerBase::IsLoggedInAsSupervisedUser() const { 579 bool UserManagerBase::IsLoggedInAsSupervisedUser() const {
580 DCHECK(task_runner_->RunsTasksOnCurrentThread()); 580 DCHECK(task_runner_->RunsTasksOnCurrentThread());
581 return IsUserLoggedIn() && active_user_->GetType() == USER_TYPE_SUPERVISED; 581 return IsUserLoggedIn() && active_user_->GetType() == USER_TYPE_SUPERVISED;
582 } 582 }
583 583
584 bool UserManagerBase::IsLoggedInAsKioskApp() const { 584 bool UserManagerBase::IsLoggedInAsKioskApp() const {
585 DCHECK(task_runner_->RunsTasksOnCurrentThread()); 585 DCHECK(task_runner_->RunsTasksOnCurrentThread());
586 return IsUserLoggedIn() && active_user_->GetType() == USER_TYPE_KIOSK_APP; 586 return IsUserLoggedIn() && active_user_->GetType() == USER_TYPE_KIOSK_APP;
587 } 587 }
588 588
589 bool UserManagerBase::IsLoggedInAsArcKioskApp() const {
590 DCHECK(task_runner_->RunsTasksOnCurrentThread());
591 return IsUserLoggedIn() && active_user_->GetType() == USER_TYPE_ARC_KIOSK_APP;
592 }
593
589 bool UserManagerBase::IsLoggedInAsStub() const { 594 bool UserManagerBase::IsLoggedInAsStub() const {
590 DCHECK(task_runner_->RunsTasksOnCurrentThread()); 595 DCHECK(task_runner_->RunsTasksOnCurrentThread());
591 return IsUserLoggedIn() && IsStubAccountId(active_user_->GetAccountId()); 596 return IsUserLoggedIn() && IsStubAccountId(active_user_->GetAccountId());
592 } 597 }
593 598
594 bool UserManagerBase::IsSessionStarted() const { 599 bool UserManagerBase::IsSessionStarted() const {
595 DCHECK(task_runner_->RunsTasksOnCurrentThread()); 600 DCHECK(task_runner_->RunsTasksOnCurrentThread());
596 return session_started_; 601 return session_started_;
597 } 602 }
598 603
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 } 1077 }
1073 1078
1074 void UserManagerBase::DeleteUser(User* user) { 1079 void UserManagerBase::DeleteUser(User* user) {
1075 const bool is_active_user = (user == active_user_); 1080 const bool is_active_user = (user == active_user_);
1076 delete user; 1081 delete user;
1077 if (is_active_user) 1082 if (is_active_user)
1078 active_user_ = nullptr; 1083 active_user_ = nullptr;
1079 } 1084 }
1080 1085
1081 } // namespace user_manager 1086 } // namespace user_manager
OLDNEW
« no previous file with comments | « components/user_manager/user_manager_base.h ('k') | components/user_manager/user_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698