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

Unified Diff: components/user_manager/user_manager_base.cc

Issue 790503002: Methods and types rename for child accounts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/user_manager/user_manager_base.cc
diff --git a/components/user_manager/user_manager_base.cc b/components/user_manager/user_manager_base.cc
index e289fadb0a18bae4ca5996c48411673d2d0c1ae5..76a8e9b67b5a702027ac673fe891ed1d4f802e4b 100644
--- a/components/user_manager/user_manager_base.cc
+++ b/components/user_manager/user_manager_base.cc
@@ -581,10 +581,9 @@ bool UserManagerBase::IsLoggedInAsUserWithGaiaAccount() const {
return IsUserLoggedIn() && active_user_->HasGaiaAccount();
}
-bool UserManagerBase::IsLoggedInAsRegularSupervisedUser() const {
+bool UserManagerBase::IsLoggedInAsChildUser() const {
DCHECK(task_runner_->RunsTasksOnCurrentThread());
- return IsUserLoggedIn() && active_user_->GetType() ==
- USER_TYPE_REGULAR_SUPERVISED;
+ return IsUserLoggedIn() && active_user_->GetType() == USER_TYPE_CHILD;
}
bool UserManagerBase::IsLoggedInAsDemoUser() const {
@@ -784,8 +783,8 @@ void UserManagerBase::EnsureUsersLoaded() {
user = User::CreateRegularUser(*it);
int user_type;
if (prefs_user_types->GetIntegerWithoutPathExpansion(*it, &user_type) &&
- user_type == USER_TYPE_REGULAR_SUPERVISED) {
- ChangeUserSupervisedStatus(user, true /* is supervised */);
+ user_type == USER_TYPE_CHILD) {
+ ChangeUserChildStatus(user, true /* is child */);
}
}
user->set_oauth_token_status(LoadUserOAuthStatus(*it));
@@ -990,16 +989,15 @@ void UserManagerBase::NotifyActiveUserHashChanged(const std::string& hash) {
ActiveUserHashChanged(hash));
}
-void UserManagerBase::ChangeUserSupervisedStatus(User* user,
- bool is_supervised) {
+void UserManagerBase::ChangeUserChildStatus(User* user, bool is_child) {
DCHECK(task_runner_->RunsTasksOnCurrentThread());
- user->SetIsSupervised(is_supervised);
- SaveUserType(user->email(), is_supervised
- ? user_manager::USER_TYPE_REGULAR_SUPERVISED
+ user->SetIsChild(is_child);
+ SaveUserType(user->email(), is_child
+ ? user_manager::USER_TYPE_CHILD
: user_manager::USER_TYPE_REGULAR);
FOR_EACH_OBSERVER(UserManager::UserSessionStateObserver,
session_state_observer_list_,
- UserChangedSupervisedStatus(user));
+ UserChangedChildStatus(user));
}
void UserManagerBase::UpdateLoginState() {
« 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