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

Unified Diff: components/user_manager/user_manager_base.cc

Issue 637533002: Added calls for deferred supervised user status change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Lost method added. Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/user_manager/user_manager_base.h ('k') | no next file » | 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 abd329c43327cf3e21c76f98af9de767c9d827e8..fa8b96c1d345c070e9b8f112e3ab7eefcd15b9a4 100644
--- a/components/user_manager/user_manager_base.cc
+++ b/components/user_manager/user_manager_base.cc
@@ -657,10 +657,6 @@ void UserManagerBase::NotifyLocalStateChanged() {
UserManager::Observer, observer_list_, LocalStateChanged(this));
}
-void UserManagerBase::ForceUpdateState() {
- UpdateLoginState();
-}
-
bool UserManagerBase::CanUserBeRemoved(const User* user) const {
// Only regular and supervised users are allowed to be manually removed.
if (!user || (user->GetType() != USER_TYPE_REGULAR &&
@@ -958,6 +954,15 @@ void UserManagerBase::NotifyActiveUserHashChanged(const std::string& hash) {
ActiveUserHashChanged(hash));
}
+void UserManagerBase::ChangeUserSupervisedStatus(User* user,
+ bool is_supervised) {
+ DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ user->SetIsSupervised(is_supervised);
+ FOR_EACH_OBSERVER(UserManager::UserSessionStateObserver,
+ session_state_observer_list_,
+ UserChangedSupervisedStatus(user));
+}
+
void UserManagerBase::UpdateLoginState() {
if (!chromeos::LoginState::IsInitialized())
return; // LoginState may not be intialized in tests.
« no previous file with comments | « components/user_manager/user_manager_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698