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

Side by Side Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 954033003: Kiosk mode: SetFirstLoginPrefs() should be called for kiosk sessions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after review. Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/user_manager/user_manager_base.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/login/session/user_session_manager.h" 5 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 NOTREACHED(); 853 NOTREACHED();
854 break; 854 break;
855 } 855 }
856 } 856 }
857 857
858 void UserSessionManager::InitProfilePreferences( 858 void UserSessionManager::InitProfilePreferences(
859 Profile* profile, 859 Profile* profile,
860 const UserContext& user_context) { 860 const UserContext& user_context) {
861 const user_manager::User* user = 861 const user_manager::User* user =
862 ProfileHelper::Get()->GetUserByProfile(profile); 862 ProfileHelper::Get()->GetUserByProfile(profile);
863 if (user->GetType() == user_manager::USER_TYPE_KIOSK_APP &&
864 profile->IsNewProfile()) {
865 ChromeUserManager::Get()->SetIsCurrentUserNew(true);
866 }
867
863 if (user->is_active()) { 868 if (user->is_active()) {
864 input_method::InputMethodManager* manager = 869 input_method::InputMethodManager* manager =
865 input_method::InputMethodManager::Get(); 870 input_method::InputMethodManager::Get();
866 manager->SetState(GetDefaultIMEState(profile)); 871 manager->SetState(GetDefaultIMEState(profile));
867 } 872 }
868 if (user_manager::UserManager::Get()->IsCurrentUserNew()) { 873 if (user_manager::UserManager::Get()->IsCurrentUserNew()) {
869 SetFirstLoginPrefs(profile, 874 SetFirstLoginPrefs(profile,
870 user_context.GetPublicSessionLocale(), 875 user_context.GetPublicSessionLocale(),
871 user_context.GetPublicSessionInputMethod()); 876 user_context.GetPublicSessionInputMethod());
872 } 877 }
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 default_ime_states_.erase(profile); 1542 default_ime_states_.erase(profile);
1538 } 1543 }
1539 1544
1540 void UserSessionManager::InjectStubUserContext( 1545 void UserSessionManager::InjectStubUserContext(
1541 const UserContext& user_context) { 1546 const UserContext& user_context) {
1542 injected_user_context_.reset(new UserContext(user_context)); 1547 injected_user_context_.reset(new UserContext(user_context));
1543 authenticator_ = NULL; 1548 authenticator_ = NULL;
1544 } 1549 }
1545 1550
1546 } // namespace chromeos 1551 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | components/user_manager/user_manager_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698