| Index: chrome/browser/chromeos/login/existing_user_controller.cc
|
| diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc
|
| index 883dd94fd69fd97f22533c04f8510a9e9beec33a..bba6d82717a7cc90e18e39f485e96285f27e843a 100644
|
| --- a/chrome/browser/chromeos/login/existing_user_controller.cc
|
| +++ b/chrome/browser/chromeos/login/existing_user_controller.cc
|
| @@ -139,6 +139,15 @@ void RecordPasswordLoginEvent(const UserContext& user_context) {
|
| }
|
| }
|
|
|
| +bool CanShowDebuggingFeatures() {
|
| + // We need to be on the login screen and in dev mode to show this menu item.
|
| + return CommandLine::ForCurrentProcess()->HasSwitch(
|
| + chromeos::switches::kSystemDevMode) &&
|
| + CommandLine::ForCurrentProcess()->HasSwitch(
|
| + chromeos::switches::kLoginManager) &&
|
| + !user_manager::UserManager::Get()->IsSessionStarted();
|
| +}
|
| +
|
| } // namespace
|
|
|
| // static
|
| @@ -569,6 +578,11 @@ void ExistingUserController::OnStartEnterpriseEnrollment() {
|
| weak_factory_.GetWeakPtr()));
|
| }
|
|
|
| +void ExistingUserController::OnStartEnableDebuggingScreen() {
|
| + if (CanShowDebuggingFeatures())
|
| + ShowEnableDebuggingScreen();
|
| +}
|
| +
|
| void ExistingUserController::OnStartKioskEnableScreen() {
|
| KioskAppManager::Get()->GetConsumerKioskAutoLaunchStatus(
|
| base::Bind(
|
| @@ -644,6 +658,12 @@ void ExistingUserController::ShowResetScreen() {
|
| host_->StartWizard(WizardController::kResetScreenName, params.Pass());
|
| }
|
|
|
| +void ExistingUserController::ShowEnableDebuggingScreen() {
|
| + scoped_ptr<base::DictionaryValue> params;
|
| + host_->StartWizard(WizardController::kEnableDebuggingScreenName,
|
| + params.Pass());
|
| +}
|
| +
|
| void ExistingUserController::ShowKioskEnableScreen() {
|
| scoped_ptr<base::DictionaryValue> params;
|
| host_->StartWizard(WizardController::kKioskEnableScreenName, params.Pass());
|
|
|