| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/demo_mode/demo_app_launcher.h" | 5 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "chrome/browser/chromeos/app_mode/app_session_lifetime.h" | 10 #include "chrome/browser/chromeos/app_mode/app_session_lifetime.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 LOG(WARNING) << "Disabling network before launching demo app.."; | 89 LOG(WARNING) << "Disabling network before launching demo app.."; |
| 90 NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler(); | 90 NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler(); |
| 91 handler->SetTechnologyEnabled(NetworkTypePattern::NonVirtual(), | 91 handler->SetTechnologyEnabled(NetworkTypePattern::NonVirtual(), |
| 92 false, | 92 false, |
| 93 chromeos::network_handler::ErrorCallback()); | 93 chromeos::network_handler::ErrorCallback()); |
| 94 | 94 |
| 95 OpenApplication(AppLaunchParams( | 95 OpenApplication(AppLaunchParams( |
| 96 profile, extension, extensions::LAUNCH_CONTAINER_WINDOW, NEW_WINDOW)); | 96 profile, extension, extensions::LAUNCH_CONTAINER_WINDOW, NEW_WINDOW)); |
| 97 InitAppSession(profile, extension_id); | 97 InitAppSession(profile, extension_id); |
| 98 | 98 |
| 99 UserManager::Get()->SessionStarted(); | 99 GetUserManager()->SessionStarted(); |
| 100 | 100 |
| 101 LoginDisplayHostImpl::default_host()->Finalize(); | 101 LoginDisplayHostImpl::default_host()->Finalize(); |
| 102 } | 102 } |
| 103 | 103 |
| 104 void DemoAppLauncher::OnProfileLoadFailed(KioskAppLaunchError::Error error) { | 104 void DemoAppLauncher::OnProfileLoadFailed(KioskAppLaunchError::Error error) { |
| 105 LOG(ERROR) << "Loading the Kiosk Profile failed: " << | 105 LOG(ERROR) << "Loading the Kiosk Profile failed: " << |
| 106 KioskAppLaunchError::GetErrorMessage(error); | 106 KioskAppLaunchError::GetErrorMessage(error); |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace chromeos | 109 } // namespace chromeos |
| OLD | NEW |