Chromium Code Reviews| 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..924d2402d54f0fef6d79212a4d1da23db835e3ad 100644 |
| --- a/chrome/browser/chromeos/login/wizard_controller.cc |
| +++ b/chrome/browser/chromeos/login/wizard_controller.cc |
| @@ -140,6 +140,18 @@ bool IsRemoraRequisition() { |
| ->IsRemoraRequisition(); |
| } |
| +// Checks if the device is a "Slave" device in the bootstrapping process. |
| +bool IsBootstrappingSlave() { |
| + return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + chromeos::switches::kOobeBootstrappingSlave); |
| +} |
| + |
| +// Checks if the device is a "Master" device in the bootstrapping process. |
| +bool IsBootstrappingMaster() { |
|
achuithb
2015/12/04 09:14:11
This is just for development, right? The master wi
xdai1
2015/12/04 19:04:15
Right. This is only for the Cros side demo and tes
|
| + return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + chromeos::switches::kOobeBootstrappingMaster); |
| +} |
| + |
| #if defined(GOOGLE_CHROME_BUILD) |
| void InitializeCrashReporter() { |
| // The crash reporter initialization needs IO to complete. |
| @@ -270,6 +282,10 @@ void WizardController::Init(const std::string& first_screen_name) { |
| } |
| } |
| + // If the device is in bootstrapping process, start the enrollment OOBE flow. |
| + if (IsBootstrappingSlave() || IsBootstrappingMaster()) |
| + GetLocalState()->SetBoolean(prefs::kDeviceEnrollmentAutoStart, true); |
| + |
| // Use the saved screen preference from Local State. |
| const std::string screen_pref = |
| GetLocalState()->GetString(prefs::kOobeScreenPending); |
| @@ -585,7 +601,7 @@ void WizardController::OnUpdateCompleted() { |
| ->browser_policy_connector_chromeos() |
| ->GetDeviceCloudPolicyManager() |
| ->IsSharkRequisition(); |
| - if (is_shark) { |
| + if (is_shark || IsBootstrappingMaster()) { |
| ShowControllerPairingScreen(); |
| } else { |
| ShowAutoEnrollmentCheckScreen(); |
| @@ -1287,7 +1303,7 @@ bool WizardController::IsHostPairingOobe() const { |
| } |
| void WizardController::MaybeStartListeningForSharkConnection() { |
| - if (!IsRemoraRequisition()) |
| + if (!IsRemoraRequisition() && !IsBootstrappingSlave()) |
| return; |
| // We shouldn't be here if we are running pairing OOBE already. |