OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/app_launch_controller.h" | 5 #include "chrome/browser/chromeos/login/app_launch_controller.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/json/json_file_value_serializer.h" | 10 #include "base/json/json_file_value_serializer.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 22 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
23 #include "chrome/browser/chromeos/login/ui/oobe_display.h" | 23 #include "chrome/browser/chromeos/login/ui/oobe_display.h" |
24 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" | 24 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" |
25 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 25 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
26 #include "chrome/browser/chromeos/settings/cros_settings.h" | 26 #include "chrome/browser/chromeos/settings/cros_settings.h" |
27 #include "chrome/browser/lifetime/application_lifetime.h" | 27 #include "chrome/browser/lifetime/application_lifetime.h" |
28 #include "chrome/browser/profiles/profile.h" | 28 #include "chrome/browser/profiles/profile.h" |
29 #include "chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handle
r.h" | 29 #include "chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handle
r.h" |
30 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 30 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
31 #include "chromeos/settings/cros_settings_names.h" | 31 #include "chromeos/settings/cros_settings_names.h" |
| 32 #include "components/user_manager/known_user.h" |
32 #include "components/user_manager/user_manager.h" | 33 #include "components/user_manager/user_manager.h" |
33 #include "content/public/browser/notification_service.h" | 34 #include "content/public/browser/notification_service.h" |
34 #include "extensions/browser/app_window/app_window.h" | 35 #include "extensions/browser/app_window/app_window.h" |
35 #include "extensions/browser/app_window/app_window_registry.h" | 36 #include "extensions/browser/app_window/app_window_registry.h" |
36 #include "net/base/network_change_notifier.h" | 37 #include "net/base/network_change_notifier.h" |
37 | 38 |
38 namespace chromeos { | 39 namespace chromeos { |
39 | 40 |
40 namespace { | 41 namespace { |
41 | 42 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 if (!CrosSettings::Get()->GetInteger( | 153 if (!CrosSettings::Get()->GetInteger( |
153 kAccountsPrefDeviceLocalAccountAutoLoginDelay, &delay)) { | 154 kAccountsPrefDeviceLocalAccountAutoLoginDelay, &delay)) { |
154 delay = 0; | 155 delay = 0; |
155 } | 156 } |
156 DCHECK_EQ(0, delay) << "Kiosks do not support non-zero auto-login delays"; | 157 DCHECK_EQ(0, delay) << "Kiosks do not support non-zero auto-login delays"; |
157 | 158 |
158 // If we are launching a kiosk app with zero delay, mark it appropriately. | 159 // If we are launching a kiosk app with zero delay, mark it appropriately. |
159 if (delay == 0) | 160 if (delay == 0) |
160 KioskAppManager::Get()->SetAppWasAutoLaunchedWithZeroDelay(app_id_); | 161 KioskAppManager::Get()->SetAppWasAutoLaunchedWithZeroDelay(app_id_); |
161 } | 162 } |
162 | |
163 kiosk_profile_loader_.reset( | 163 kiosk_profile_loader_.reset( |
164 new KioskProfileLoader(app.user_id, false, this)); | 164 new KioskProfileLoader(app.account_id, false, this)); |
165 kiosk_profile_loader_->Start(); | 165 kiosk_profile_loader_->Start(); |
166 } | 166 } |
167 | 167 |
168 // static | 168 // static |
169 void AppLaunchController::SkipSplashWaitForTesting() { | 169 void AppLaunchController::SkipSplashWaitForTesting() { |
170 skip_splash_wait_ = true; | 170 skip_splash_wait_ = true; |
171 } | 171 } |
172 | 172 |
173 // static | 173 // static |
174 void AppLaunchController::SetNetworkWaitForTesting(int wait_time_secs) { | 174 void AppLaunchController::SetNetworkWaitForTesting(int wait_time_secs) { |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 KioskAppLaunchError::Save(error); | 446 KioskAppLaunchError::Save(error); |
447 chrome::AttemptUserExit(); | 447 chrome::AttemptUserExit(); |
448 CleanUp(); | 448 CleanUp(); |
449 } | 449 } |
450 | 450 |
451 bool AppLaunchController::IsShowingNetworkConfigScreen() { | 451 bool AppLaunchController::IsShowingNetworkConfigScreen() { |
452 return network_config_requested_; | 452 return network_config_requested_; |
453 } | 453 } |
454 | 454 |
455 } // namespace chromeos | 455 } // namespace chromeos |
OLD | NEW |