| Index: chrome/browser/chromeos/login/wizard_controller.cc
|
| diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc
|
| index cceb4996f963a248a6b420958f8f8d4d56fb10a4..6066d893f8ab2154a97c11a26d4cb3449ffbaa4a 100644
|
| --- a/chrome/browser/chromeos/login/wizard_controller.cc
|
| +++ b/chrome/browser/chromeos/login/wizard_controller.cc
|
| @@ -133,11 +133,14 @@ void RecordUMAHistogramForOOBEStepCompletionTime(std::string screen_name,
|
| histogram->AddTime(step_time);
|
| }
|
|
|
| -bool IsRemoraRequisition() {
|
| - return g_browser_process->platform_part()
|
| - ->browser_policy_connector_chromeos()
|
| - ->GetDeviceCloudPolicyManager()
|
| - ->IsRemoraRequisition();
|
| +bool IsBootstrappingRemora() {
|
| + return base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + chromeos::switches::kOobeBootstrappingRemora);
|
| +}
|
| +
|
| +bool IsBootstrappingShark() {
|
| + return base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + chromeos::switches::kOobeBootstrappingShark);
|
| }
|
|
|
| #if defined(GOOGLE_CHROME_BUILD)
|
| @@ -270,10 +273,14 @@ void WizardController::Init(const std::string& first_screen_name) {
|
| }
|
| }
|
|
|
| + // If the device is remora or shark, start the enrollment OOBE process.
|
| + if (IsBootstrappingRemora() || IsBootstrappingShark())
|
| + GetLocalState()->SetBoolean(prefs::kDeviceEnrollmentAutoStart, true);
|
| +
|
| // Use the saved screen preference from Local State.
|
| const std::string screen_pref =
|
| GetLocalState()->GetString(prefs::kOobeScreenPending);
|
| - if (is_out_of_box_ && !screen_pref.empty() && !IsHostPairingOobe() &&
|
| + if (is_out_of_box_ && !screen_pref.empty() && !IsBootstrappingRemoraOobe() &&
|
| (first_screen_name.empty() ||
|
| first_screen_name == WizardController::kTestNoScreenName)) {
|
| first_screen_name_ = screen_pref;
|
| @@ -581,11 +588,7 @@ void WizardController::OnConnectionFailed() {
|
| }
|
|
|
| void WizardController::OnUpdateCompleted() {
|
| - const bool is_shark = g_browser_process->platform_part()
|
| - ->browser_policy_connector_chromeos()
|
| - ->GetDeviceCloudPolicyManager()
|
| - ->IsSharkRequisition();
|
| - if (is_shark) {
|
| + if (IsBootstrappingShark()) {
|
| ShowControllerPairingScreen();
|
| } else {
|
| ShowAutoEnrollmentCheckScreen();
|
| @@ -921,7 +924,7 @@ void WizardController::AdvanceToScreen(const std::string& screen_name) {
|
| } else if (screen_name != kTestNoScreenName) {
|
| if (is_out_of_box_) {
|
| time_oobe_started_ = base::Time::Now();
|
| - if (IsHostPairingOobe()) {
|
| + if (IsBootstrappingRemoraOobe()) {
|
| ShowHostPairingScreen();
|
| } else if (CanShowHIDDetectionScreen()) {
|
| hid_screen_ = GetScreen(kHIDDetectionScreenName);
|
| @@ -1279,19 +1282,16 @@ bool WizardController::SetOnTimeZoneResolvedForTesting(
|
| return true;
|
| }
|
|
|
| -bool WizardController::IsHostPairingOobe() const {
|
| - return IsRemoraRequisition() &&
|
| - (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kHostPairingOobe) ||
|
| - shark_controller_detected_);
|
| +bool WizardController::IsBootstrappingRemoraOobe() const {
|
| + return IsBootstrappingRemora() && shark_controller_detected_;
|
| }
|
|
|
| void WizardController::MaybeStartListeningForSharkConnection() {
|
| - if (!IsRemoraRequisition())
|
| + if (!IsBootstrappingRemora())
|
| return;
|
|
|
| - // We shouldn't be here if we are running pairing OOBE already.
|
| - DCHECK(!IsHostPairingOobe());
|
| + // We shouldn't be here if we are running bootstrapping OOBE already.
|
| + DCHECK(!IsBootstrappingRemoraOobe());
|
|
|
| if (!shark_connection_listener_) {
|
| shark_connection_listener_.reset(
|
|
|