diff options
| -rw-r--r-- | chrome/browser/ui/webui/chromeos/login/reset_screen_handler.cc | 7 | ||||
| -rw-r--r-- | chromeos/chromeos_switches.cc | 3 | ||||
| -rw-r--r-- | chromeos/chromeos_switches.h | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/chrome/browser/ui/webui/chromeos/login/reset_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/reset_screen_handler.cc index eea79ba..9efdca4 100644 --- a/chrome/browser/ui/webui/chromeos/login/reset_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/reset_screen_handler.cc @@ -13,7 +13,6 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/chromeos/login/help_app_launcher.h" #include "chrome/browser/chromeos/reset/metrics.h" -#include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" #include "chromeos/chromeos_switches.h" #include "chromeos/dbus/dbus_thread_manager.h" @@ -97,7 +96,11 @@ void ResetScreenHandler::Show() { rollback_available_ = false; if (!restart_required_) // First exec after boot. reboot_was_requested_ = prefs->GetBoolean(prefs::kFactoryResetRequested); - if (!restart_required_ && reboot_was_requested_) { + if (!CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableRollbackOption)) { + rollback_available_ = false; + ShowWithParams(); + } else if (!restart_required_ && reboot_was_requested_) { // First exec after boot. rollback_available_ = prefs->GetBoolean(prefs::kRollbackRequested); ShowWithParams(); diff --git a/chromeos/chromeos_switches.cc b/chromeos/chromeos_switches.cc index fd35ff8..e830b0d 100644 --- a/chromeos/chromeos_switches.cc +++ b/chromeos/chromeos_switches.cc @@ -77,6 +77,9 @@ const char kEnableTouchpadThreeFingerClick[] // than the kiosk app mode. const char kEnableKioskMode[] = "enable-kiosk-mode"; +// Enables rollback option for resetting ChromeOS. +const char kEnableRollbackOption[] = "enable-rollback-option"; + // Enables request of tablet site (via user agent override). const char kEnableRequestTabletSite[] = "enable-request-tablet-site"; diff --git a/chromeos/chromeos_switches.h b/chromeos/chromeos_switches.h index 097f9d6..3beffec 100644 --- a/chromeos/chromeos_switches.h +++ b/chromeos/chromeos_switches.h @@ -39,6 +39,7 @@ CHROMEOS_EXPORT extern const char kEchoExtensionPath[]; CHROMEOS_EXPORT extern const char kEnableCarrierSwitching[]; CHROMEOS_EXPORT extern const char kEnableKioskMode[]; CHROMEOS_EXPORT extern const char kEnableNetworkPortalNotification[]; +CHROMEOS_EXPORT extern const char kEnableRollbackOption[]; CHROMEOS_EXPORT extern const char kEnableRequestTabletSite[]; CHROMEOS_EXPORT extern const char kEnableTouchpadThreeFingerClick[]; CHROMEOS_EXPORT extern const char kEnterpriseEnableForcedReEnrollment[]; |
