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/wizard_controller.h" | 5 #include "chrome/browser/chromeos/login/wizard_controller.h" |
6 | 6 |
7 #include <signal.h> | 7 #include <signal.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <sys/types.h> | 9 #include <sys/types.h> |
10 | 10 |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 | 484 |
485 SetStatusAreaVisible(true); | 485 SetStatusAreaVisible(true); |
486 | 486 |
487 bool is_auto_enrollment = false; | 487 bool is_auto_enrollment = false; |
488 std::string user; | 488 std::string user; |
489 if (screen_parameters_.get()) { | 489 if (screen_parameters_.get()) { |
490 screen_parameters_->GetBoolean("is_auto_enrollment", &is_auto_enrollment); | 490 screen_parameters_->GetBoolean("is_auto_enrollment", &is_auto_enrollment); |
491 screen_parameters_->GetString("user", &user); | 491 screen_parameters_->GetString("user", &user); |
492 } | 492 } |
493 | 493 |
494 EnrollmentScreenActor::EnrollmentMode mode = | 494 EnrollmentScreenActor::EnrollmentMode mode; |
495 EnrollmentScreenActor::ENROLLMENT_MODE_MANUAL; | |
496 if (is_auto_enrollment) | 495 if (is_auto_enrollment) |
497 mode = EnrollmentScreenActor::ENROLLMENT_MODE_AUTO; | 496 mode = EnrollmentScreenActor::ENROLLMENT_MODE_AUTO; |
| 497 else if (ShouldRecoverEnrollment()) |
| 498 mode = EnrollmentScreenActor::ENROLLMENT_MODE_RECOVERY; |
498 else if (ShouldAutoStartEnrollment() && !CanExitEnrollment()) | 499 else if (ShouldAutoStartEnrollment() && !CanExitEnrollment()) |
499 mode = EnrollmentScreenActor::ENROLLMENT_MODE_FORCED; | 500 mode = EnrollmentScreenActor::ENROLLMENT_MODE_FORCED; |
500 else if (ShouldRecoverEnrollment()) | 501 else |
501 mode = EnrollmentScreenActor::ENROLLMENT_MODE_FORCED; | 502 mode = EnrollmentScreenActor::ENROLLMENT_MODE_MANUAL; |
502 | 503 |
503 EnrollmentScreen* screen = GetEnrollmentScreen(); | 504 EnrollmentScreen* screen = GetEnrollmentScreen(); |
504 screen->SetParameters(mode, GetForcedEnrollmentDomain(), user); | 505 screen->SetParameters(mode, GetForcedEnrollmentDomain(), user); |
505 SetCurrentScreen(screen); | 506 SetCurrentScreen(screen); |
506 } | 507 } |
507 | 508 |
508 void WizardController::ShowResetScreen() { | 509 void WizardController::ShowResetScreen() { |
509 VLOG(1) << "Showing reset screen."; | 510 VLOG(1) << "Showing reset screen."; |
510 SetStatusAreaVisible(false); | 511 SetStatusAreaVisible(false); |
511 SetCurrentScreen(GetResetScreen()); | 512 SetCurrentScreen(GetResetScreen()); |
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1256 bool WizardController::SetOnTimeZoneResolvedForTesting( | 1257 bool WizardController::SetOnTimeZoneResolvedForTesting( |
1257 const base::Closure& callback) { | 1258 const base::Closure& callback) { |
1258 if (timezone_resolved_) | 1259 if (timezone_resolved_) |
1259 return false; | 1260 return false; |
1260 | 1261 |
1261 on_timezone_resolved_for_testing_ = callback; | 1262 on_timezone_resolved_for_testing_ = callback; |
1262 return true; | 1263 return true; |
1263 } | 1264 } |
1264 | 1265 |
1265 } // namespace chromeos | 1266 } // namespace chromeos |
OLD | NEW |