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 33b223df551dc0ca3b2d0d1827153987c2deba47..69a006752fa39c2b105d472f40ccdb5c8c0d64ff 100644 |
--- a/chrome/browser/chromeos/login/wizard_controller.cc |
+++ b/chrome/browser/chromeos/login/wizard_controller.cc |
@@ -109,6 +109,9 @@ const char *kResumableScreens[] = { |
chromeos::WizardController::kAutoEnrollmentCheckScreenName |
}; |
+// the role of a "slave" device in the OOBE bootstrapping process. |
achuithb
2016/10/01 16:49:17
s/the/The
|
+const char kOobeBootstrappingSlave[] = "slave"; |
achuithb
2016/10/01 16:49:17
Is this the only possible value? Why not have a bo
xdai1
2016/10/03 21:08:00
You're right. Since we don't need an accelerator f
|
+ |
// Checks flag for HID-detection screen show. |
bool CanShowHIDDetectionScreen() { |
return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
@@ -166,6 +169,12 @@ void SetControllerDetectedPref(bool value) { |
prefs->CommitPendingWrite(); |
} |
+// Checks if the device is a "slave" device in the bootstrapping process. |
+bool IsBootstrappingSlave() { |
+ return g_browser_process->local_state()->GetString( |
+ prefs::kOobeBootstrappingRole) == kOobeBootstrappingSlave; |
+} |
+ |
// Checks if the device is a "Master" device in the bootstrapping process. |
bool IsBootstrappingMaster() { |
return base::CommandLine::ForCurrentProcess()->HasSwitch( |
@@ -430,7 +439,8 @@ void WizardController::ShowNetworkScreen() { |
SetStatusAreaVisible(HasScreen(kNetworkScreenName)); |
SetCurrentScreen(GetScreen(kNetworkScreenName)); |
- MaybeStartListeningForSharkConnection(); |
+ if (IsBootstrappingSlave()) |
+ MaybeStartListeningForSharkConnection(); |
} |
void WizardController::ShowLoginScreen(const LoginScreenContext& context) { |