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

Unified Diff: components/user_manager/fake_user_manager.cc

Issue 2885933003: arc: Consolidate IsArcAllowedForUser logic (Closed)
Patch Set: add comment for arc kiosk user check Created 3 years, 7 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/fake_user_manager.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/fake_user_manager.cc
diff --git a/components/user_manager/fake_user_manager.cc b/components/user_manager/fake_user_manager.cc
index 6a24694e3a5068039cc923b4964dff460091adb9..80799cc3c330b5d63f0b3ca707078690a9c8151c 100644
--- a/components/user_manager/fake_user_manager.cc
+++ b/components/user_manager/fake_user_manager.cc
@@ -88,10 +88,6 @@ user_manager::UserList FakeUserManager::GetUsersAllowedForMultiProfile() const {
return result;
}
-const user_manager::UserList& FakeUserManager::GetLoggedInUsers() const {
- return logged_in_users_;
-}
-
void FakeUserManager::UserLoggedIn(const AccountId& account_id,
const std::string& username_hash,
bool browser_restart) {
@@ -104,9 +100,14 @@ void FakeUserManager::UserLoggedIn(const AccountId& account_id,
if (!primary_user_)
primary_user_ = *it;
+ if (!active_user_)
+ active_user_ = *it;
break;
}
}
+
+ if (!active_user_ && AreEphemeralUsersEnabled())
+ RegularUserLoggedInAsEphemeral(account_id);
}
user_manager::User* FakeUserManager::GetActiveUserInternal() const {
@@ -261,7 +262,11 @@ bool FakeUserManager::AreSupervisedUsersAllowed() const {
}
bool FakeUserManager::AreEphemeralUsersEnabled() const {
- return false;
+ return GetEphemeralUsersEnabled();
+}
+
+void FakeUserManager::SetEphemeralUsersEnabled(bool enabled) {
+ UserManagerBase::SetEphemeralUsersEnabled(enabled);
}
const std::string& FakeUserManager::GetApplicationLocale() const {
« no previous file with comments | « components/user_manager/fake_user_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698