| 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/app_mode/kiosk_app_launcher.h" | 5 #include "chrome/browser/chromeos/app_mode/kiosk_app_launcher.h" |
| 6 | 6 |
| 7 #include "base/chromeos/chromeos_version.h" | 7 #include "base/chromeos/chromeos_version.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 public: | 106 public: |
| 107 explicit ProfileLoader(KioskAppLauncher* launcher) | 107 explicit ProfileLoader(KioskAppLauncher* launcher) |
| 108 : launcher_(launcher) { | 108 : launcher_(launcher) { |
| 109 } | 109 } |
| 110 | 110 |
| 111 virtual ~ProfileLoader() { | 111 virtual ~ProfileLoader() { |
| 112 LoginUtils::Get()->DelegateDeleted(this); | 112 LoginUtils::Get()->DelegateDeleted(this); |
| 113 } | 113 } |
| 114 | 114 |
| 115 void Start() { | 115 void Start() { |
| 116 // TODO(nkostylev): Pass real username_hash here. | 116 // TODO(nkostylev): Pass real username_hash here. crbug.com/238985 |
| 117 LoginUtils::Get()->PrepareProfile( | 117 LoginUtils::Get()->PrepareProfile( |
| 118 UserContext(GetAppUserNameFromAppId(launcher_->app_id_), | 118 UserContext(GetAppUserNameFromAppId(launcher_->app_id_), |
| 119 std::string(), // password | 119 std::string(), // password |
| 120 std::string()), // auth_code | 120 std::string()), // auth_code |
| 121 std::string(), // display email | 121 std::string(), // display email |
| 122 false, // using_oauth | 122 false, // using_oauth |
| 123 false, // has_cookies | 123 false, // has_cookies |
| 124 this); | 124 this); |
| 125 } | 125 } |
| 126 | 126 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 (new chromeos::StartupAppLauncher(profile, app_id_))->Start(); | 231 (new chromeos::StartupAppLauncher(profile, app_id_))->Start(); |
| 232 | 232 |
| 233 if (LoginDisplayHostImpl::default_host()) | 233 if (LoginDisplayHostImpl::default_host()) |
| 234 LoginDisplayHostImpl::default_host()->OnSessionStart(); | 234 LoginDisplayHostImpl::default_host()->OnSessionStart(); |
| 235 UserManager::Get()->SessionStarted(); | 235 UserManager::Get()->SessionStarted(); |
| 236 | 236 |
| 237 ReportLaunchResult(KioskAppLaunchError::NONE); | 237 ReportLaunchResult(KioskAppLaunchError::NONE); |
| 238 } | 238 } |
| 239 | 239 |
| 240 } // namespace chromeos | 240 } // namespace chromeos |
| OLD | NEW |