Commit e66a4960 authored by alemate's avatar alemate Committed by Commit bot

Kiosk mode: SetFirstLoginPrefs() should be called for kiosk sessions.

SetFirstLoginPrefs() should be called for kiosk sessions.

BUG=445544
TEST=manual

Review URL: https://codereview.chromium.org/954033003

Cr-Commit-Position: refs/heads/master@{#318239}
parent 20fdc7ec
...@@ -860,6 +860,11 @@ void UserSessionManager::InitProfilePreferences( ...@@ -860,6 +860,11 @@ void UserSessionManager::InitProfilePreferences(
const UserContext& user_context) { const UserContext& user_context) {
const user_manager::User* user = const user_manager::User* user =
ProfileHelper::Get()->GetUserByProfile(profile); ProfileHelper::Get()->GetUserByProfile(profile);
if (user->GetType() == user_manager::USER_TYPE_KIOSK_APP &&
profile->IsNewProfile()) {
ChromeUserManager::Get()->SetIsCurrentUserNew(true);
}
if (user->is_active()) { if (user->is_active()) {
input_method::InputMethodManager* manager = input_method::InputMethodManager* manager =
input_method::InputMethodManager::Get(); input_method::InputMethodManager::Get();
......
...@@ -104,6 +104,8 @@ class USER_MANAGER_EXPORT UserManagerBase : public UserManager { ...@@ -104,6 +104,8 @@ class USER_MANAGER_EXPORT UserManagerBase : public UserManager {
void NotifyLocalStateChanged() override; void NotifyLocalStateChanged() override;
void ChangeUserChildStatus(User* user, bool is_child) override; void ChangeUserChildStatus(User* user, bool is_child) override;
virtual void SetIsCurrentUserNew(bool is_new);
// Helper function that copies users from |users_list| to |users_vector| and // Helper function that copies users from |users_list| to |users_vector| and
// |users_set|. Duplicates and users already present in |existing_users| are // |users_set|. Duplicates and users already present in |existing_users| are
// skipped. // skipped.
...@@ -238,8 +240,6 @@ class USER_MANAGER_EXPORT UserManagerBase : public UserManager { ...@@ -238,8 +240,6 @@ class USER_MANAGER_EXPORT UserManagerBase : public UserManager {
virtual bool GetEphemeralUsersEnabled() const; virtual bool GetEphemeralUsersEnabled() const;
virtual void SetEphemeralUsersEnabled(bool enabled); virtual void SetEphemeralUsersEnabled(bool enabled);
virtual void SetIsCurrentUserNew(bool is_new);
virtual void SetOwnerEmail(std::string owner_user_id); virtual void SetOwnerEmail(std::string owner_user_id);
virtual const std::string& GetPendingUserSwitchID() const; virtual const std::string& GetPendingUserSwitchID() const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment