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

Unified Diff: components/user_manager/user_manager_base.cc

Issue 866763002: User class update made independent of profile state update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resetting user status to same as existing one prevented. Created 5 years, 11 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 | « chrome/browser/supervised_user/child_accounts/child_account_service.cc ('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 08f5a07108e518ebae46a76066b01f7b2abf51c4..d10f95622851350487a49be3bfba97f3710551f2 100644
--- a/components/user_manager/user_manager_base.cc
+++ b/components/user_manager/user_manager_base.cc
@@ -982,10 +982,11 @@ void UserManagerBase::NotifyActiveUserHashChanged(const std::string& hash) {
void UserManagerBase::ChangeUserChildStatus(User* user, bool is_child) {
DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ if (user->IsSupervised() == is_child)
+ return;
user->SetIsChild(is_child);
- SaveUserType(user->email(), is_child
- ? user_manager::USER_TYPE_CHILD
- : user_manager::USER_TYPE_REGULAR);
+ SaveUserType(user->email(), is_child ? user_manager::USER_TYPE_CHILD
+ : user_manager::USER_TYPE_REGULAR);
FOR_EACH_OBSERVER(UserManager::UserSessionStateObserver,
session_state_observer_list_,
UserChangedChildStatus(user));
« no previous file with comments | « chrome/browser/supervised_user/child_accounts/child_account_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698