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

Unified 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: Initialize Kiosk profile only once. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/user_manager/user_manager_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/session/user_session_manager.cc
diff --git a/chrome/browser/chromeos/login/session/user_session_manager.cc b/chrome/browser/chromeos/login/session/user_session_manager.cc
index d50a9a7296d2354ab837dc01d55e17161d4cda1a..d991ab3982e3641e4c839a77eb89927369212c50 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/user_session_manager.cc
@@ -834,10 +834,17 @@ void UserSessionManager::OnProfileCreated(const UserContext& user_context,
CHECK(profile);
switch (status) {
- case Profile::CREATE_STATUS_CREATED:
+ case Profile::CREATE_STATUS_CREATED: {
// Profile created but before initializing extensions and promo resources.
+ const user_manager::User* user =
+ ProfileHelper::Get()->GetUserByProfile(profile);
+ if (user->GetType() == user_manager::USER_TYPE_KIOSK_APP &&
+ profile->IsNewProfile()) {
+ ChromeUserManager::Get()->SetIsCurrentUserNew(true);
+ }
xiyuan 2015/02/26 15:13:18 Think the code should be moved into InitProfilePre
Alexander Alekseev 2015/02/26 15:35:44 Done.
+
InitProfilePreferences(profile, user_context);
- break;
+ } break;
xiyuan 2015/02/26 15:13:18 nit: "break" on a separate line.
Alexander Alekseev 2015/02/26 15:35:44 Done.
case Profile::CREATE_STATUS_INITIALIZED:
// Profile is created, extensions and promo resources are initialized.
// At this point all other Chrome OS services will be notified that it is
« 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