| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/enrollment/enrollment_screen.h" | 5 #include "chrome/browser/chromeos/login/enrollment/enrollment_screen.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 policy::BrowserPolicyConnectorChromeOS* connector = | 170 policy::BrowserPolicyConnectorChromeOS* connector = |
| 171 g_browser_process->platform_part()->browser_policy_connector_chromeos(); | 171 g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
| 172 if (connector->GetDeviceMode() == policy::DEVICE_MODE_RETAIL_KIOSK) { | 172 if (connector->GetDeviceMode() == policy::DEVICE_MODE_RETAIL_KIOSK) { |
| 173 DBusThreadManager::Get()->GetSessionManagerClient()->StopSession(); | 173 DBusThreadManager::Get()->GetSessionManagerClient()->StopSession(); |
| 174 return; | 174 return; |
| 175 } | 175 } |
| 176 | 176 |
| 177 if (is_auto_enrollment_ && | 177 if (is_auto_enrollment_ && |
| 178 !enrollment_failed_once_ && | 178 !enrollment_failed_once_ && |
| 179 !user_.empty() && | 179 !user_.empty() && |
| 180 LoginUtils::IsWhitelisted(user_)) { | 180 LoginUtils::IsWhitelisted(user_, NULL)) { |
| 181 actor_->ShowLoginSpinnerScreen(); | 181 actor_->ShowLoginSpinnerScreen(); |
| 182 get_screen_observer()->OnExit( | 182 get_screen_observer()->OnExit( |
| 183 ScreenObserver::ENTERPRISE_AUTO_MAGIC_ENROLLMENT_COMPLETED); | 183 ScreenObserver::ENTERPRISE_AUTO_MAGIC_ENROLLMENT_COMPLETED); |
| 184 } else { | 184 } else { |
| 185 actor_->ResetAuth( | 185 actor_->ResetAuth( |
| 186 base::Bind(&ScreenObserver::OnExit, | 186 base::Bind(&ScreenObserver::OnExit, |
| 187 base::Unretained(get_screen_observer()), | 187 base::Unretained(get_screen_observer()), |
| 188 ScreenObserver::ENTERPRISE_ENROLLMENT_COMPLETED)); | 188 ScreenObserver::ENTERPRISE_ENROLLMENT_COMPLETED)); |
| 189 } | 189 } |
| 190 } | 190 } |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 sample = policy::kMetricEnrollmentAutoFailed; | 291 sample = policy::kMetricEnrollmentAutoFailed; |
| 292 UMA(sample); | 292 UMA(sample); |
| 293 } | 293 } |
| 294 | 294 |
| 295 void EnrollmentScreen::ShowSigninScreen() { | 295 void EnrollmentScreen::ShowSigninScreen() { |
| 296 actor_->Show(); | 296 actor_->Show(); |
| 297 actor_->ShowSigninScreen(); | 297 actor_->ShowSigninScreen(); |
| 298 } | 298 } |
| 299 | 299 |
| 300 } // namespace chromeos | 300 } // namespace chromeos |
| OLD | NEW |