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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
494 EnrollmentScreenActor::EnrollmentMode mode = | 494 EnrollmentScreenActor::EnrollmentMode mode = |
495 EnrollmentScreenActor::ENROLLMENT_MODE_MANUAL; | 495 EnrollmentScreenActor::ENROLLMENT_MODE_MANUAL; |
496 if (is_auto_enrollment) | 496 if (is_auto_enrollment) |
497 mode = EnrollmentScreenActor::ENROLLMENT_MODE_AUTO; | 497 mode = EnrollmentScreenActor::ENROLLMENT_MODE_AUTO; |
498 else if (ShouldAutoStartEnrollment() && !CanExitEnrollment()) | 498 else if (ShouldAutoStartEnrollment() && !CanExitEnrollment()) |
499 mode = EnrollmentScreenActor::ENROLLMENT_MODE_FORCED; | 499 mode = EnrollmentScreenActor::ENROLLMENT_MODE_FORCED; |
500 else if (ShouldRecoverEnrollment()) | 500 else if (ShouldRecoverEnrollment()) |
501 mode = EnrollmentScreenActor::ENROLLMENT_MODE_FORCED; | 501 mode = EnrollmentScreenActor::ENROLLMENT_MODE_FORCED; |
502 | 502 |
503 EnrollmentScreen* screen = GetEnrollmentScreen(); | 503 EnrollmentScreen* screen = GetEnrollmentScreen(); |
504 screen->SetParameters(mode, GetForcedEnrollmentDomain(), user); | 504 screen->SetParameters(mode, GetForcedEnrollmentDomain(), user, auth_token_); |
505 SetCurrentScreen(screen); | 505 SetCurrentScreen(screen); |
506 } | 506 } |
507 | 507 |
508 void WizardController::ShowResetScreen() { | 508 void WizardController::ShowResetScreen() { |
509 VLOG(1) << "Showing reset screen."; | 509 VLOG(1) << "Showing reset screen."; |
510 SetStatusAreaVisible(false); | 510 SetStatusAreaVisible(false); |
511 SetCurrentScreen(GetResetScreen()); | 511 SetCurrentScreen(GetResetScreen()); |
512 } | 512 } |
513 | 513 |
514 void WizardController::ShowKioskEnableScreen() { | 514 void WizardController::ShowKioskEnableScreen() { |
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1255 | 1255 |
1256 bool WizardController::SetOnTimeZoneResolvedForTesting( | 1256 bool WizardController::SetOnTimeZoneResolvedForTesting( |
1257 const base::Closure& callback) { | 1257 const base::Closure& callback) { |
1258 if (timezone_resolved_) | 1258 if (timezone_resolved_) |
1259 return false; | 1259 return false; |
1260 | 1260 |
1261 on_timezone_resolved_for_testing_ = callback; | 1261 on_timezone_resolved_for_testing_ = callback; |
1262 return true; | 1262 return true; |
1263 } | 1263 } |
1264 | 1264 |
1265 void WizardController::OnEnrollmentAuthTokenReceived( | |
bartfab (slow)
2014/07/16 10:09:15
Nit: There are no callers of this method yet. Docu
achuithb
2014/08/13 01:57:43
Done, kept it brief.
| |
1266 const std::string& token) { | |
1267 VLOG(1) << "OnEnrollmentAuthTokenReceived " << token; | |
1268 if (ShouldAutoStartEnrollment() || ShouldRecoverEnrollment()) { | |
1269 StartupUtils::MarkEulaAccepted(); | |
bartfab (slow)
2014/07/16 10:09:15
Is it OK to just silently accept the EULA?
achuithb
2014/08/13 01:57:43
Yup, the EULA is accepted on the controller side,
| |
1270 auth_token_ = token; | |
1271 InitiateOOBEUpdate(); | |
1272 } else { | |
1273 LOG(WARNING) << "Not in device enrollment"; | |
bartfab (slow)
2014/07/16 10:09:15
Nit: Add full stop to make this a complete sentenc
achuithb
2014/08/13 01:57:43
Done.
| |
1274 } | |
1275 } | |
1276 | |
1265 } // namespace chromeos | 1277 } // namespace chromeos |
OLD | NEW |