| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 chromeos::WizardController::kNetworkScreenName, | 92 chromeos::WizardController::kNetworkScreenName, |
| 93 chromeos::WizardController::kUpdateScreenName, | 93 chromeos::WizardController::kUpdateScreenName, |
| 94 chromeos::WizardController::kEulaScreenName, | 94 chromeos::WizardController::kEulaScreenName, |
| 95 chromeos::WizardController::kEnrollmentScreenName, | 95 chromeos::WizardController::kEnrollmentScreenName, |
| 96 chromeos::WizardController::kTermsOfServiceScreenName, | 96 chromeos::WizardController::kTermsOfServiceScreenName, |
| 97 chromeos::WizardController::kAutoEnrollmentCheckScreenName | 97 chromeos::WizardController::kAutoEnrollmentCheckScreenName |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 // Checks flag for HID-detection screen show. | 100 // Checks flag for HID-detection screen show. |
| 101 bool CanShowHIDDetectionScreen() { | 101 bool CanShowHIDDetectionScreen() { |
| 102 return CommandLine::ForCurrentProcess()->HasSwitch( | 102 return !CommandLine::ForCurrentProcess()->HasSwitch( |
| 103 chromeos::switches::kEnableHIDDetectionOnOOBE); | 103 chromeos::switches::kDisableHIDDetectionOnOOBE); |
| 104 } | 104 } |
| 105 | 105 |
| 106 bool IsResumableScreen(const std::string& screen) { | 106 bool IsResumableScreen(const std::string& screen) { |
| 107 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kResumableScreens); ++i) { | 107 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kResumableScreens); ++i) { |
| 108 if (screen == kResumableScreens[i]) | 108 if (screen == kResumableScreens[i]) |
| 109 return true; | 109 return true; |
| 110 } | 110 } |
| 111 return false; | 111 return false; |
| 112 } | 112 } |
| 113 | 113 |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 FOR_EACH_OBSERVER(Observer, observer_list_, OnSessionStart()); | 538 FOR_EACH_OBSERVER(Observer, observer_list_, OnSessionStart()); |
| 539 } | 539 } |
| 540 | 540 |
| 541 void WizardController::SkipUpdateEnrollAfterEula() { | 541 void WizardController::SkipUpdateEnrollAfterEula() { |
| 542 skip_update_enroll_after_eula_ = true; | 542 skip_update_enroll_after_eula_ = true; |
| 543 } | 543 } |
| 544 | 544 |
| 545 /////////////////////////////////////////////////////////////////////////////// | 545 /////////////////////////////////////////////////////////////////////////////// |
| 546 // WizardController, ExitHandlers: | 546 // WizardController, ExitHandlers: |
| 547 void WizardController::OnHIDDetectionCompleted() { | 547 void WizardController::OnHIDDetectionCompleted() { |
| 548 ShowNetworkScreen(); | 548 // Check for tests configuration. |
| 549 if (!StartupUtils::IsOobeCompleted()) |
| 550 ShowNetworkScreen(); |
| 549 } | 551 } |
| 550 | 552 |
| 551 void WizardController::OnNetworkConnected() { | 553 void WizardController::OnNetworkConnected() { |
| 552 if (is_official_build_) { | 554 if (is_official_build_) { |
| 553 if (!StartupUtils::IsEulaAccepted()) { | 555 if (!StartupUtils::IsEulaAccepted()) { |
| 554 ShowEulaScreen(); | 556 ShowEulaScreen(); |
| 555 } else { | 557 } else { |
| 556 // Possible cases: | 558 // Possible cases: |
| 557 // 1. EULA was accepted, forced shutdown/reboot during update. | 559 // 1. EULA was accepted, forced shutdown/reboot during update. |
| 558 // 2. EULA was accepted, planned reboot after update. | 560 // 2. EULA was accepted, planned reboot after update. |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1121 bool WizardController::SetOnTimeZoneResolvedForTesting( | 1123 bool WizardController::SetOnTimeZoneResolvedForTesting( |
| 1122 const base::Closure& callback) { | 1124 const base::Closure& callback) { |
| 1123 if (timezone_resolved_) | 1125 if (timezone_resolved_) |
| 1124 return false; | 1126 return false; |
| 1125 | 1127 |
| 1126 on_timezone_resolved_for_testing_ = callback; | 1128 on_timezone_resolved_for_testing_ = callback; |
| 1127 return true; | 1129 return true; |
| 1128 } | 1130 } |
| 1129 | 1131 |
| 1130 } // namespace chromeos | 1132 } // namespace chromeos |
| OLD | NEW |