Commit e96fb154 authored by achuith@chromium.org's avatar achuith@chromium.org

Introduce disable-gaia-services for fake telemetry login.

oobe-skip-postlogin has been overloaded and it does a lot more than just suppress the postlogin screens.

We need session restore/merge and enrollment for gaia login, but not for fake telemetry login.

BUG=393011
TEST=manual
NOTRY=True

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283594 0039d316-1c4b-4281-b951-d872f2087c98
parent 9b9ec682
...@@ -92,12 +92,12 @@ void AutoEnrollmentController::Start() { ...@@ -92,12 +92,12 @@ void AutoEnrollmentController::Start() {
// accepted, or right after a reboot if the EULA has already been accepted. // accepted, or right after a reboot if the EULA has already been accepted.
// Do not communicate auto-enrollment data to the server if // Do not communicate auto-enrollment data to the server if
// 1. we are running integration or perf tests with telemetry. // 1. we are running telemetry tests.
// 2. modulus configuration is not present. // 2. modulus configuration is not present.
// 3. Auto-enrollment is disabled via the command line. // 3. Auto-enrollment is disabled via the command line.
CommandLine* command_line = CommandLine::ForCurrentProcess(); CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(chromeos::switches::kOobeSkipPostLogin) || if (command_line->HasSwitch(chromeos::switches::kDisableGaiaServices) ||
(!command_line->HasSwitch( (!command_line->HasSwitch(
chromeos::switches::kEnterpriseEnrollmentInitialModulus) && chromeos::switches::kEnterpriseEnrollmentInitialModulus) &&
!command_line->HasSwitch( !command_line->HasSwitch(
......
...@@ -760,7 +760,7 @@ void UserSessionManager::RestoreAuthSessionImpl(Profile* profile, ...@@ -760,7 +760,7 @@ void UserSessionManager::RestoreAuthSessionImpl(Profile* profile,
if (chrome::IsRunningInForcedAppMode() || if (chrome::IsRunningInForcedAppMode() ||
CommandLine::ForCurrentProcess()->HasSwitch( CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kOobeSkipPostLogin)) { chromeos::switches::kDisableGaiaServices)) {
return; return;
} }
......
...@@ -40,10 +40,11 @@ OAuth2LoginManager::OAuth2LoginManager(Profile* user_profile) ...@@ -40,10 +40,11 @@ OAuth2LoginManager::OAuth2LoginManager(Profile* user_profile)
restore_strategy_(RESTORE_FROM_COOKIE_JAR), restore_strategy_(RESTORE_FROM_COOKIE_JAR),
state_(SESSION_RESTORE_NOT_STARTED) { state_(SESSION_RESTORE_NOT_STARTED) {
GetTokenService()->AddObserver(this); GetTokenService()->AddObserver(this);
// For telemetry, we mark session restore completed to avoid warnings from
// MergeSessionThrottle.
if (CommandLine::ForCurrentProcess()-> if (CommandLine::ForCurrentProcess()->
HasSwitch(chromeos::switches::kOobeSkipPostLogin)) { HasSwitch(chromeos::switches::kDisableGaiaServices)) {
// For telemetry we should mark session restore completed to avoid
// warnings from MergeSessionThrottle.
SetSessionRestoreState(SESSION_RESTORE_DONE); SetSessionRestoreState(SESSION_RESTORE_DONE);
} }
} }
......
...@@ -185,6 +185,10 @@ const char kNaturalScrollDefault[] = "enable-natural-scroll-default"; ...@@ -185,6 +185,10 @@ const char kNaturalScrollDefault[] = "enable-natural-scroll-default";
// Skips all other OOBE pages after user login. // Skips all other OOBE pages after user login.
const char kOobeSkipPostLogin[] = "oobe-skip-postlogin"; const char kOobeSkipPostLogin[] = "oobe-skip-postlogin";
// Disable GAIA services such as enrollment and OAuth session restore. Used by
// 'fake' telemetry login.
const char kDisableGaiaServices[] = "disable-gaia-services";
// Interval at which we check for total time on OOBE. // Interval at which we check for total time on OOBE.
const char kOobeTimerInterval[] = "oobe-timer-interval"; const char kOobeTimerInterval[] = "oobe-timer-interval";
......
...@@ -28,6 +28,7 @@ CHROMEOS_EXPORT extern const char kDerelictDetectionTimeout[]; ...@@ -28,6 +28,7 @@ CHROMEOS_EXPORT extern const char kDerelictDetectionTimeout[];
CHROMEOS_EXPORT extern const char kDerelictIdleTimeout[]; CHROMEOS_EXPORT extern const char kDerelictIdleTimeout[];
CHROMEOS_EXPORT extern const char kDisableBootAnimation[]; CHROMEOS_EXPORT extern const char kDisableBootAnimation[];
CHROMEOS_EXPORT extern const char kDisableDemoMode[]; CHROMEOS_EXPORT extern const char kDisableDemoMode[];
CHROMEOS_EXPORT extern const char kDisableGaiaServices[];
CHROMEOS_EXPORT extern const char kDisableGeniusApp[]; CHROMEOS_EXPORT extern const char kDisableGeniusApp[];
CHROMEOS_EXPORT extern const char kDisableHIDDetectionOnOOBE[]; CHROMEOS_EXPORT extern const char kDisableHIDDetectionOnOOBE[];
CHROMEOS_EXPORT extern const char kDisableLoginAnimations[]; CHROMEOS_EXPORT extern const char kDisableLoginAnimations[];
......
...@@ -78,12 +78,13 @@ class CrOSBrowserBackend(chrome_browser_backend.ChromeBrowserBackend): ...@@ -78,12 +78,13 @@ class CrOSBrowserBackend(chrome_browser_backend.ChromeBrowserBackend):
'--remote-debugging-port=%i' % self._remote_debugging_port, '--remote-debugging-port=%i' % self._remote_debugging_port,
# Open a maximized window. # Open a maximized window.
'--start-maximized', '--start-maximized',
# Skip user image selection screen, and post login screens.
'--oobe-skip-postlogin',
# Debug logging. # Debug logging.
'--vmodule=*/chromeos/net/*=2,*/chromeos/login/*=2']) '--vmodule=*/chromeos/net/*=2,*/chromeos/login/*=2'])
if not self.browser_options.gaia_login: if not self.browser_options.gaia_login:
# Skip user image selection screen, and post login screens. args.append('--disable-gaia-services')
args.append('--oobe-skip-postlogin')
return args return args
......
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