| 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 "apps/shell_window_registry.h" | 7 #include "apps/shell_window_registry.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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 waiting_for_network_ = true; | 294 waiting_for_network_ = true; |
| 295 network_wait_timer_.Start( | 295 network_wait_timer_.Start( |
| 296 FROM_HERE, | 296 FROM_HERE, |
| 297 base::TimeDelta::FromSeconds(network_wait_time_), | 297 base::TimeDelta::FromSeconds(network_wait_time_), |
| 298 this, &AppLaunchController::OnNetworkWaitTimedout); | 298 this, &AppLaunchController::OnNetworkWaitTimedout); |
| 299 | 299 |
| 300 app_launch_splash_screen_actor_->UpdateAppLaunchState( | 300 app_launch_splash_screen_actor_->UpdateAppLaunchState( |
| 301 AppLaunchSplashScreenActor::APP_LAUNCH_STATE_PREPARING_NETWORK); | 301 AppLaunchSplashScreenActor::APP_LAUNCH_STATE_PREPARING_NETWORK); |
| 302 } | 302 } |
| 303 | 303 |
| 304 bool AppLaunchController::IsNetworkReady() { |
| 305 return app_launch_splash_screen_actor_->IsNetworkReady(); |
| 306 } |
| 307 |
| 304 void AppLaunchController::OnLoadingOAuthFile() { | 308 void AppLaunchController::OnLoadingOAuthFile() { |
| 305 app_launch_splash_screen_actor_->UpdateAppLaunchState( | 309 app_launch_splash_screen_actor_->UpdateAppLaunchState( |
| 306 AppLaunchSplashScreenActor::APP_LAUNCH_STATE_LOADING_AUTH_FILE); | 310 AppLaunchSplashScreenActor::APP_LAUNCH_STATE_LOADING_AUTH_FILE); |
| 307 } | 311 } |
| 308 | 312 |
| 309 void AppLaunchController::OnInitializingTokenService() { | 313 void AppLaunchController::OnInitializingTokenService() { |
| 310 app_launch_splash_screen_actor_->UpdateAppLaunchState( | 314 app_launch_splash_screen_actor_->UpdateAppLaunchState( |
| 311 AppLaunchSplashScreenActor::APP_LAUNCH_STATE_LOADING_TOKEN_SERVICE); | 315 AppLaunchSplashScreenActor::APP_LAUNCH_STATE_LOADING_TOKEN_SERVICE); |
| 312 } | 316 } |
| 313 | 317 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 << ", error=" << error; | 373 << ", error=" << error; |
| 370 DCHECK_NE(KioskAppLaunchError::NONE, error); | 374 DCHECK_NE(KioskAppLaunchError::NONE, error); |
| 371 | 375 |
| 372 // Saves the error and ends the session to go back to login screen. | 376 // Saves the error and ends the session to go back to login screen. |
| 373 KioskAppLaunchError::Save(error); | 377 KioskAppLaunchError::Save(error); |
| 374 chrome::AttemptUserExit(); | 378 chrome::AttemptUserExit(); |
| 375 CleanUp(); | 379 CleanUp(); |
| 376 } | 380 } |
| 377 | 381 |
| 378 } // namespace chromeos | 382 } // namespace chromeos |
| OLD | NEW |