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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 #include <sys/types.h> | 10 #include <sys/types.h> |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
725 return; | 725 return; |
726 #if defined(GOOGLE_CHROME_BUILD) | 726 #if defined(GOOGLE_CHROME_BUILD) |
727 if (!content::BrowserThread::PostBlockingPoolTask( | 727 if (!content::BrowserThread::PostBlockingPoolTask( |
728 FROM_HERE, base::Bind(&InitializeCrashReporter))) { | 728 FROM_HERE, base::Bind(&InitializeCrashReporter))) { |
729 LOG(ERROR) << "Failed to start crash reporter initialization."; | 729 LOG(ERROR) << "Failed to start crash reporter initialization."; |
730 } | 730 } |
731 #endif | 731 #endif |
732 } | 732 } |
733 | 733 |
734 void WizardController::OnUpdateErrorCheckingForUpdate() { | 734 void WizardController::OnUpdateErrorCheckingForUpdate() { |
735 // TODO(nkostylev): Update should be required during OOBE. | 735 bool is_hands_off_mode = |
achuithb
2017/02/14 09:05:25
nit const
Ben Chan
2017/02/14 18:31:11
Done.
| |
736 // We do not want to block users from being able to proceed to the login | 736 (policy::DeviceCloudPolicyManagerChromeOS::GetZeroTouchEnrollmentMode() == |
737 // screen if there is any error checking for an update. | 737 policy::ZeroTouchEnrollmentMode::HANDS_OFF); |
738 // They could use "browse without sign-in" feature to set up the network to be | 738 |
739 // able to perform the update later. | 739 // If there was an error while checking for update, return to the network |
740 OnUpdateCompleted(); | 740 // selection screen if the OOBE isn't complete (unless it's in the zero-touch |
741 // enrollment mode) as we don't want to miss any critical update. Otherwise, | |
742 // we do not want to block users from being able to proceed to the login | |
743 // screen if there is any error checking for an update. They could use | |
744 // "browse without sign-in" feature to set up the network to be able to | |
745 // perform the update later. | |
746 if (is_out_of_box_ && !is_hands_off_mode) | |
achuithb
2017/02/14 09:05:25
Is hands off mode behavior covered by browser test
Ben Chan
2017/02/14 18:31:11
It's indirectly covered by those HandsOff*Test tes
| |
747 ShowNetworkScreen(); | |
748 else | |
749 OnUpdateCompleted(); | |
741 } | 750 } |
742 | 751 |
743 void WizardController::OnUpdateErrorUpdating(bool is_critical_update) { | 752 void WizardController::OnUpdateErrorUpdating(bool is_critical_update) { |
744 // If there was an error while getting or applying the update, return to | 753 // If there was an error while getting or applying the update, return to |
745 // network selection screen if the OOBE isn't complete and the update is | 754 // network selection screen if the OOBE isn't complete and the update is |
746 // deemed critical. Otherwise, similar to OnUpdateErrorCheckingForUpdate(), | 755 // deemed critical. Otherwise, similar to OnUpdateErrorCheckingForUpdate(), |
747 // we do not want to block users from being able to proceed to the login | 756 // we do not want to block users from being able to proceed to the login |
748 // screen. | 757 // screen. |
749 if (is_out_of_box_ && is_critical_update) | 758 if (is_out_of_box_ && is_critical_update) |
750 ShowNetworkScreen(); | 759 ShowNetworkScreen(); |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1507 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT; | 1516 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT; |
1508 } | 1517 } |
1509 | 1518 |
1510 EnrollmentScreen* screen = EnrollmentScreen::Get(this); | 1519 EnrollmentScreen* screen = EnrollmentScreen::Get(this); |
1511 screen->SetParameters(effective_config, shark_controller_.get()); | 1520 screen->SetParameters(effective_config, shark_controller_.get()); |
1512 SetStatusAreaVisible(true); | 1521 SetStatusAreaVisible(true); |
1513 SetCurrentScreen(screen); | 1522 SetCurrentScreen(screen); |
1514 } | 1523 } |
1515 | 1524 |
1516 } // namespace chromeos | 1525 } // namespace chromeos |
OLD | NEW |