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

Side by Side Diff: chrome/browser/chromeos/login/login_display_host_impl.cc

Issue 83293004: kiosk: Show enrollment screen first if needed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, fix LOG(INFO) Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/login_ui_browsertest.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/login_display_host_impl.h" 5 #include "chrome/browser/chromeos/login/login_display_host_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/desktop_background/desktop_background_controller.h" 9 #include "ash/desktop_background/desktop_background_controller.h"
10 #include "ash/desktop_background/user_wallpaper_delegate.h" 10 #include "ash/desktop_background/user_wallpaper_delegate.h"
(...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 LoginState::LOGGED_IN_OOBE, LoginState::LOGGED_IN_USER_NONE); 1115 LoginState::LOGGED_IN_OOBE, LoginState::LOGGED_IN_USER_NONE);
1116 } else { 1116 } else {
1117 LoginState::Get()->SetLoggedInState( 1117 LoginState::Get()->SetLoggedInState(
1118 LoginState::LOGGED_IN_NONE, LoginState::LOGGED_IN_USER_NONE); 1118 LoginState::LOGGED_IN_NONE, LoginState::LOGGED_IN_USER_NONE);
1119 } 1119 }
1120 1120
1121 LoginDisplayHost* display_host = new LoginDisplayHostImpl(screen_bounds); 1121 LoginDisplayHost* display_host = new LoginDisplayHostImpl(screen_bounds);
1122 1122
1123 bool show_app_launch_splash_screen = (first_screen_name == 1123 bool show_app_launch_splash_screen = (first_screen_name ==
1124 chromeos::WizardController::kAppLaunchSplashScreenName); 1124 chromeos::WizardController::kAppLaunchSplashScreenName);
1125
1126 if (show_app_launch_splash_screen) { 1125 if (show_app_launch_splash_screen) {
1127 const std::string& auto_launch_app_id = 1126 const std::string& auto_launch_app_id =
1128 chromeos::KioskAppManager::Get()->GetAutoLaunchApp(); 1127 chromeos::KioskAppManager::Get()->GetAutoLaunchApp();
1129 display_host->StartAppLaunch(auto_launch_app_id); 1128 display_host->StartAppLaunch(auto_launch_app_id);
1130 return; 1129 return;
1131 } 1130 }
1132 1131
1132 bool should_show_enrollment_screen =
1133 first_screen_name.empty() && oobe_complete &&
1134 chromeos::WizardController::ShouldAutoStartEnrollment() &&
1135 !g_browser_process->browser_policy_connector()->IsEnterpriseManaged();
1136 if (should_show_enrollment_screen) {
1137 display_host->StartWizard(chromeos::WizardController::kEnrollmentScreenName,
1138 scoped_ptr<DictionaryValue>());
1139 return;
1140 }
1141
1133 bool show_login_screen = 1142 bool show_login_screen =
1134 (first_screen_name.empty() && oobe_complete) || 1143 (first_screen_name.empty() && oobe_complete) ||
1135 first_screen_name == chromeos::WizardController::kLoginScreenName; 1144 first_screen_name == chromeos::WizardController::kLoginScreenName;
1136 1145
1137 if (show_login_screen) { 1146 if (show_login_screen) {
1138 // R11 > R12 migration fix. See http://crosbug.com/p/4898. 1147 // R11 > R12 migration fix. See http://crosbug.com/p/4898.
1139 // If user has manually changed locale during R11 OOBE, locale will be set. 1148 // If user has manually changed locale during R11 OOBE, locale will be set.
1140 // On R12 > R12|R13 etc. this fix won't get activated since 1149 // On R12 > R12|R13 etc. this fix won't get activated since
1141 // OOBE process has set kApplicationLocale to non-default value. 1150 // OOBE process has set kApplicationLocale to non-default value.
1142 PrefService* prefs = g_browser_process->local_state(); 1151 PrefService* prefs = g_browser_process->local_state();
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1198 1207
1199 scoped_ptr<locale_util::SwitchLanguageCallback> callback( 1208 scoped_ptr<locale_util::SwitchLanguageCallback> callback(
1200 new locale_util::SwitchLanguageCallback( 1209 new locale_util::SwitchLanguageCallback(
1201 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); 1210 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass()))));
1202 1211
1203 // Do not load locale keyboards here. 1212 // Do not load locale keyboards here.
1204 locale_util::SwitchLanguage(locale, false, callback.Pass()); 1213 locale_util::SwitchLanguage(locale, false, callback.Pass());
1205 } 1214 }
1206 1215
1207 } // namespace chromeos 1216 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/login_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698