From 1ebecb847cc6da9a045ab7b39afede429f2adac2 Mon Sep 17 00:00:00 2001 From: hirono Date: Mon, 11 May 2015 20:21:55 -0700 Subject: [PATCH] Files.app: Relax condtion to skip OOBE demo mode. Due to Issue 398271 , we are disabling OOBE demo on test image, which makes it hard to test OOBE demo. We can relax the condition, so that it does not skip when derelict related switches are specified. BUG=485471 TEST=None Review URL: https://codereview.chromium.org/1130173002 Cr-Commit-Position: refs/heads/master@{#329339} --- chrome/browser/ui/webui/chromeos/login/demo_mode_detector.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chrome/browser/ui/webui/chromeos/login/demo_mode_detector.cc b/chrome/browser/ui/webui/chromeos/login/demo_mode_detector.cc index b65e16bd7658..0c88882f7934 100644 --- a/chrome/browser/ui/webui/chromeos/login/demo_mode_detector.cc +++ b/chrome/browser/ui/webui/chromeos/login/demo_mode_detector.cc @@ -39,7 +39,13 @@ void DemoModeDetector::InitDetection() { switches::kDisableDemoMode)) return; - if (base::SysInfo::IsRunningOnChromeOS()) { + const bool has_derelict_switch = + base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDerelictDetectionTimeout) || + base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDerelictIdleTimeout); + + if (base::SysInfo::IsRunningOnChromeOS() && !has_derelict_switch) { std::string track; // We're running on an actual device; if we cannot find our release track // value or if the track contains "testimage", don't start demo mode. -- 2.11.4.GIT