Commit 5b2b51bd authored by zork's avatar zork Committed by Commit bot

Use shark requisition instead of command line parameter

BUG=None

Review URL: https://codereview.chromium.org/524903003

Cr-Commit-Position: refs/heads/master@{#293056}
parent 6942fdd7
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
#include "chrome/browser/chromeos/net/delay_network_call.h" #include "chrome/browser/chromeos/net/delay_network_call.h"
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
#include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h" #include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h"
#include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
#include "chrome/browser/chromeos/settings/cros_settings.h" #include "chrome/browser/chromeos/settings/cros_settings.h"
#include "chrome/browser/chromeos/timezone/timezone_provider.h" #include "chrome/browser/chromeos/timezone/timezone_provider.h"
#include "chrome/browser/lifetime/application_lifetime.h" #include "chrome/browser/lifetime/application_lifetime.h"
...@@ -105,11 +106,6 @@ bool CanShowHIDDetectionScreen() { ...@@ -105,11 +106,6 @@ bool CanShowHIDDetectionScreen() {
chromeos::switches::kDisableHIDDetectionOnOOBE); chromeos::switches::kDisableHIDDetectionOnOOBE);
} }
bool ShouldShowControllerPairingScreen() {
return CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kShowControllerPairingDemo);
}
bool ShouldShowHostPairingScreen() { bool ShouldShowHostPairingScreen() {
return CommandLine::ForCurrentProcess()->HasSwitch( return CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kShowHostPairingDemo); chromeos::switches::kShowHostPairingDemo);
...@@ -632,7 +628,11 @@ void WizardController::OnConnectionFailed() { ...@@ -632,7 +628,11 @@ void WizardController::OnConnectionFailed() {
void WizardController::OnUpdateCompleted() { void WizardController::OnUpdateCompleted() {
// TODO(dzhioev): place checks related to pairing in a proper place. // TODO(dzhioev): place checks related to pairing in a proper place.
if (ShouldShowControllerPairingScreen()) { const bool is_shark =
g_browser_process->platform_part()->browser_policy_connector_chromeos()->
GetDeviceCloudPolicyManager()->IsSharkRequisition();
if (is_shark) {
ShowControllerPairingScreen(); ShowControllerPairingScreen();
} else if (ShouldShowHostPairingScreen()) { } else if (ShouldShowHostPairingScreen()) {
ShowHostPairingScreen(); ShowHostPairingScreen();
......
...@@ -216,10 +216,6 @@ const char kPowerStub[] = "power-stub"; ...@@ -216,10 +216,6 @@ const char kPowerStub[] = "power-stub";
// 'interactive=3' - Interactive mode, connect/scan/etc requests take 3 secs // 'interactive=3' - Interactive mode, connect/scan/etc requests take 3 secs
const char kShillStub[] = "shill-stub"; const char kShillStub[] = "shill-stub";
// If this switch is set, controller pairing process is displayed after update
// stage of OOBE.
const char kShowControllerPairingDemo[] = "show-controller-pairing-demo";
// If this switch is set, controller pairing process is displayed after update // If this switch is set, controller pairing process is displayed after update
// stage of OOBE. // stage of OOBE.
const char kShowHostPairingDemo[] = "show-host-pairing-demo"; const char kShowHostPairingDemo[] = "show-host-pairing-demo";
......
...@@ -74,7 +74,6 @@ CHROMEOS_EXPORT extern const char kOobeSkipPostLogin[]; ...@@ -74,7 +74,6 @@ CHROMEOS_EXPORT extern const char kOobeSkipPostLogin[];
CHROMEOS_EXPORT extern const char kOobeTimerInterval[]; CHROMEOS_EXPORT extern const char kOobeTimerInterval[];
CHROMEOS_EXPORT extern const char kPowerStub[]; CHROMEOS_EXPORT extern const char kPowerStub[];
CHROMEOS_EXPORT extern const char kShillStub[]; CHROMEOS_EXPORT extern const char kShillStub[];
CHROMEOS_EXPORT extern const char kShowControllerPairingDemo[];
CHROMEOS_EXPORT extern const char kShowHostPairingDemo[]; CHROMEOS_EXPORT extern const char kShowHostPairingDemo[];
CHROMEOS_EXPORT extern const char kSmsTestMessages[]; CHROMEOS_EXPORT extern const char kSmsTestMessages[];
CHROMEOS_EXPORT extern const char kStubCrosSettings[]; CHROMEOS_EXPORT extern const char kStubCrosSettings[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment