Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(657)

Unified Diff: chrome/browser/chromeos/login/wizard_controller.cc

Issue 1492043002: Introduced switches for Master/Slave bootstrapping process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address achuith@'s comment Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
dzhioev (left Google) 2015/12/04 21:23:00 I don't get it. Does this flag affect anything? As
+ return base::CommandLine::ForCurrentProcess()->HasSwitch(
+ chromeos::switches::kOobeBootstrappingSlave);
+}
+
+// Checks if the device is a "Master" device in the bootstrapping process.
+bool IsBootstrappingMaster() {
+ 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);
dzhioev (left Google) 2015/12/05 00:23:33 Could you please move this code to DeviceCloudPoli
+
// 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.
« no previous file with comments | « no previous file | chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698