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

Unified Diff: components/user_manager/user_manager_base.cc

Issue 2519823006: Chromad: Add authentication flow (Closed)
Patch Set: Rename HandleAdAuth. Use system_api enums Created 4 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.cc ('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 24772d6b8e9d967ecf21e323303a84d6851baa8e..5144ed5cfe73aa0233ab02585378cca9bf2b8750 100644
--- a/components/user_manager/user_manager_base.cc
+++ b/components/user_manager/user_manager_base.cc
@@ -696,7 +696,9 @@ void UserManagerBase::NotifyUserProfileImageUpdated(
bool UserManagerBase::CanUserBeRemoved(const User* user) const {
// Only regular and supervised users are allowed to be manually removed.
- if (!user || !(user->HasGaiaAccount() || user->IsSupervised()))
+ if (!user ||
+ !(user->HasGaiaAccount() || user->IsSupervised() ||
+ user->IsActiveDirectoryUser()))
return false;
// Sanity check: we must not remove single user unless it's an enterprise
@@ -977,7 +979,8 @@ User* UserManagerBase::RemoveRegularOrSupervisedUserFromList(
user = *it;
it = users_.erase(it);
} else {
- if ((*it)->HasGaiaAccount() || (*it)->IsSupervised()) {
+ if ((*it)->HasGaiaAccount() || (*it)->IsSupervised() ||
+ (*it)->IsActiveDirectoryUser()) {
const std::string user_email = (*it)->GetAccountId().GetUserEmail();
prefs_users_update->AppendString(user_email);
}
« no previous file with comments | « components/user_manager/user.cc ('k') | components/user_manager/user_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698