Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1310)

Unified Diff: chrome/browser/chromeos/login/existing_user_controller.cc

Issue 539273002: Added UI to enable debugging features on CrOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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());
« no previous file with comments | « chrome/browser/chromeos/login/existing_user_controller.h ('k') | chrome/browser/chromeos/login/help_app_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698