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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
113 if (!webui_visible_) { | 113 if (!webui_visible_) { |
114 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE, | 114 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE, |
115 content::NotificationService::AllSources()); | 115 content::NotificationService::AllSources()); |
116 } | 116 } |
117 launch_splash_start_time_ = base::TimeTicks::Now().ToInternalValue(); | 117 launch_splash_start_time_ = base::TimeTicks::Now().ToInternalValue(); |
118 | 118 |
119 // TODO(tengs): Add a loading profile app launch state. | 119 // TODO(tengs): Add a loading profile app launch state. |
120 app_launch_splash_screen_actor_->SetDelegate(this); | 120 app_launch_splash_screen_actor_->SetDelegate(this); |
121 app_launch_splash_screen_actor_->Show(app_id_); | 121 app_launch_splash_screen_actor_->Show(app_id_); |
122 | 122 |
123 KioskAppManager::App app; | |
124 CHECK(KioskAppManager::Get() && | |
bartfab (slow)
2014/02/13 19:51:53
Nit 1: Better split this into two separate CHECKs.
rkc
2014/02/13 23:22:01
Done.
| |
125 KioskAppManager::Get()->GetApp(app_id_, &app)); | |
123 kiosk_profile_loader_.reset( | 126 kiosk_profile_loader_.reset( |
124 new KioskProfileLoader(KioskAppManager::Get(), app_id_, this)); | 127 new KioskProfileLoader(app.user_id, false, this)); |
125 kiosk_profile_loader_->Start(); | 128 kiosk_profile_loader_->Start(); |
126 } | 129 } |
127 | 130 |
128 // static | 131 // static |
129 void AppLaunchController::SkipSplashWaitForTesting() { | 132 void AppLaunchController::SkipSplashWaitForTesting() { |
130 skip_splash_wait_ = true; | 133 skip_splash_wait_ = true; |
131 } | 134 } |
132 | 135 |
133 // static | 136 // static |
134 void AppLaunchController::SetNetworkWaitForTesting(int wait_time_secs) { | 137 void AppLaunchController::SetNetworkWaitForTesting(int wait_time_secs) { |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
369 << ", error=" << error; | 372 << ", error=" << error; |
370 DCHECK_NE(KioskAppLaunchError::NONE, error); | 373 DCHECK_NE(KioskAppLaunchError::NONE, error); |
371 | 374 |
372 // Saves the error and ends the session to go back to login screen. | 375 // Saves the error and ends the session to go back to login screen. |
373 KioskAppLaunchError::Save(error); | 376 KioskAppLaunchError::Save(error); |
374 chrome::AttemptUserExit(); | 377 chrome::AttemptUserExit(); |
375 CleanUp(); | 378 CleanUp(); |
376 } | 379 } |
377 | 380 |
378 } // namespace chromeos | 381 } // namespace chromeos |
OLD | NEW |