| 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 54cf518e3bfbf3618853f5c4ca5a00b602669e1f..4cac5f3e48dcac3b0e3a40ff72f4956de90fdc96 100644
|
| --- a/chrome/browser/chromeos/login/existing_user_controller.cc
|
| +++ b/chrome/browser/chromeos/login/existing_user_controller.cc
|
| @@ -138,6 +138,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
|
| @@ -652,6 +661,11 @@ void ExistingUserController::OnStartEnterpriseEnrollment() {
|
| weak_factory_.GetWeakPtr()));
|
| }
|
|
|
| +void ExistingUserController::OnStartEnableDebuggingScreen() {
|
| + if (CanShowDebuggingFeatures())
|
| + ShowEnableDebuggingScreen();
|
| +}
|
| +
|
| void ExistingUserController::OnStartKioskEnableScreen() {
|
| KioskAppManager::Get()->GetConsumerKioskAutoLaunchStatus(
|
| base::Bind(
|
| @@ -727,6 +741,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());
|
|
|