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

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

Issue 562923002: Make host pairing screen the first screen for shark requisition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months 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 | no next file » | 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 563cfc510d97800b1db3d1f2ddc55bc73c574e3a..c5f63ee385afec71c36194383eaf7432c5f74fb6 100644
--- a/chrome/browser/chromeos/login/wizard_controller.cc
+++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -108,9 +108,14 @@ bool CanShowHIDDetectionScreen() {
chromeos::switches::kDisableHIDDetectionOnOOBE);
}
+// Checks if we are a remora waiting for a shark.
bool ShouldShowHostPairingScreen() {
- return CommandLine::ForCurrentProcess()->HasSwitch(
+ const bool is_remora =
+ g_browser_process->platform_part()->browser_policy_connector_chromeos()->
+ GetDeviceCloudPolicyManager()->IsRemoraRequisition();
+ const bool pairing_demo = CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kShowHostPairingDemo);
+ return is_remora && pairing_demo;
}
bool IsResumableScreen(const std::string& screen) {
@@ -261,9 +266,11 @@ void WizardController::Init(
}
}
+ // 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() && (first_screen_name.empty() ||
+ if (is_out_of_box_ && !screen_pref.empty() &&
+ !ShouldShowHostPairingScreen() && (first_screen_name.empty() ||
first_screen_name == WizardController::kTestNoScreenName)) {
first_screen_name_ = screen_pref;
}
@@ -572,8 +579,6 @@ void WizardController::OnUpdateCompleted() {
if (is_shark) {
ShowControllerPairingScreen();
- } else if (ShouldShowHostPairingScreen()) {
- ShowHostPairingScreen();
} else if (!auth_token_.empty()) {
// TODO(achuith): There is an issue with the auto enrollment check and
// remote enrollment. crbug.com/403147.
@@ -898,7 +903,9 @@ 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 (CanShowHIDDetectionScreen()) {
+ if (ShouldShowHostPairingScreen()) {
+ ShowHostPairingScreen();
+ } else if (CanShowHIDDetectionScreen()) {
base::Callback<void(bool)> on_check = base::Bind(
&WizardController::OnHIDScreenNecessityCheck,
weak_factory_.GetWeakPtr());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698