| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 chromeos::WizardController::kNetworkScreenName, | 99 chromeos::WizardController::kNetworkScreenName, |
| 100 chromeos::WizardController::kUpdateScreenName, | 100 chromeos::WizardController::kUpdateScreenName, |
| 101 chromeos::WizardController::kEulaScreenName, | 101 chromeos::WizardController::kEulaScreenName, |
| 102 chromeos::WizardController::kEnrollmentScreenName, | 102 chromeos::WizardController::kEnrollmentScreenName, |
| 103 chromeos::WizardController::kTermsOfServiceScreenName, | 103 chromeos::WizardController::kTermsOfServiceScreenName, |
| 104 chromeos::WizardController::kAutoEnrollmentCheckScreenName | 104 chromeos::WizardController::kAutoEnrollmentCheckScreenName |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 // Checks flag for HID-detection screen show. | 107 // Checks flag for HID-detection screen show. |
| 108 bool CanShowHIDDetectionScreen() { | 108 bool CanShowHIDDetectionScreen() { |
| 109 return !CommandLine::ForCurrentProcess()->HasSwitch( | 109 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 110 chromeos::switches::kDisableHIDDetectionOnOOBE); | 110 chromeos::switches::kDisableHIDDetectionOnOOBE); |
| 111 } | 111 } |
| 112 | 112 |
| 113 bool IsResumableScreen(const std::string& screen) { | 113 bool IsResumableScreen(const std::string& screen) { |
| 114 for (size_t i = 0; i < arraysize(kResumableScreens); ++i) { | 114 for (size_t i = 0; i < arraysize(kResumableScreens); ++i) { |
| 115 if (screen == kResumableScreens[i]) | 115 if (screen == kResumableScreens[i]) |
| 116 return true; | 116 return true; |
| 117 } | 117 } |
| 118 return false; | 118 return false; |
| 119 } | 119 } |
| 120 | 120 |
| (...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1245 const base::Closure& callback) { | 1245 const base::Closure& callback) { |
| 1246 if (timezone_resolved_) | 1246 if (timezone_resolved_) |
| 1247 return false; | 1247 return false; |
| 1248 | 1248 |
| 1249 on_timezone_resolved_for_testing_ = callback; | 1249 on_timezone_resolved_for_testing_ = callback; |
| 1250 return true; | 1250 return true; |
| 1251 } | 1251 } |
| 1252 | 1252 |
| 1253 bool WizardController::IsHostPairingOobe() const { | 1253 bool WizardController::IsHostPairingOobe() const { |
| 1254 return IsRemoraRequisition() && | 1254 return IsRemoraRequisition() && |
| 1255 (CommandLine::ForCurrentProcess()->HasSwitch(switches::kHostPairingOobe) || | 1255 (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1256 shark_controller_detected_); | 1256 switches::kHostPairingOobe) || |
| 1257 shark_controller_detected_); |
| 1257 } | 1258 } |
| 1258 | 1259 |
| 1259 void WizardController::MaybeStartListeningForSharkConnection() { | 1260 void WizardController::MaybeStartListeningForSharkConnection() { |
| 1260 if (!IsRemoraRequisition()) | 1261 if (!IsRemoraRequisition()) |
| 1261 return; | 1262 return; |
| 1262 | 1263 |
| 1263 // We shouldn't be here if we are running pairing OOBE already. | 1264 // We shouldn't be here if we are running pairing OOBE already. |
| 1264 DCHECK(!IsHostPairingOobe()); | 1265 DCHECK(!IsHostPairingOobe()); |
| 1265 | 1266 |
| 1266 if (!shark_connection_listener_) { | 1267 if (!shark_connection_listener_) { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1296 } | 1297 } |
| 1297 | 1298 |
| 1298 EnrollmentScreen* screen = EnrollmentScreen::Get(this); | 1299 EnrollmentScreen* screen = EnrollmentScreen::Get(this); |
| 1299 screen->SetParameters(effective_config, shark_controller_.get(), | 1300 screen->SetParameters(effective_config, shark_controller_.get(), |
| 1300 remora_controller_.get()); | 1301 remora_controller_.get()); |
| 1301 SetStatusAreaVisible(true); | 1302 SetStatusAreaVisible(true); |
| 1302 SetCurrentScreen(screen); | 1303 SetCurrentScreen(screen); |
| 1303 } | 1304 } |
| 1304 | 1305 |
| 1305 } // namespace chromeos | 1306 } // namespace chromeos |
| OLD | NEW |