| 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 e487a32e1cc96a3e020edf77cf4172399088e444..ffe8ecbee13ab8c3763beffcdcdab01cdbb3db8e 100644
|
| --- a/chrome/browser/chromeos/login/existing_user_controller.cc
|
| +++ b/chrome/browser/chromeos/login/existing_user_controller.cc
|
| @@ -137,6 +137,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
|
| @@ -654,6 +663,11 @@ void ExistingUserController::OnStartEnterpriseEnrollment() {
|
| weak_factory_.GetWeakPtr()));
|
| }
|
|
|
| +void ExistingUserController::OnStartEnableDebuggingScreen() {
|
| + if (CanShowDebuggingFeatures())
|
| + ShowEnableDebuggingScreen();
|
| +}
|
| +
|
| void ExistingUserController::OnStartKioskEnableScreen() {
|
| KioskAppManager::Get()->GetConsumerKioskAutoLaunchStatus(
|
| base::Bind(
|
| @@ -729,6 +743,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());
|
|
|