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

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

Issue 10096012: [cros] Add Ctrl+Alt+E shortcut to Welcome/EULA screen that cancels update and starts with enrollment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add test Created 8 years, 8 months 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/wizard_controller.cc
diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc
index 075e016b0cc633ce86df765d8c634b9134c190d4..257498a986f7b9e392c4c6ebcd3b89730310f8a7 100644
--- a/chrome/browser/chromeos/login/wizard_controller.cc
+++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -135,7 +135,8 @@ WizardController::WizardController(chromeos::LoginDisplayHost* host,
is_out_of_box_(false),
host_(host),
oobe_display_(oobe_display),
- usage_statistics_reporting_(true) {
+ usage_statistics_reporting_(true),
+ skip_update_enroll_after_eula_(false) {
DCHECK(default_controller_ == NULL);
default_controller_ = this;
}
@@ -327,6 +328,10 @@ void WizardController::SkipRegistration() {
LOG(ERROR) << "Registration screen is not active.";
}
+void WizardController::SkipUpdateEnrollAfterEula() {
+ skip_update_enroll_after_eula_ = true;
+}
+
// static
void WizardController::RegisterPrefs(PrefService* local_state) {
local_state->RegisterBooleanPref(kOobeComplete,
@@ -412,7 +417,13 @@ void WizardController::OnEulaAccepted() {
#endif
}
- InitiateOOBEUpdate();
+ if (skip_update_enroll_after_eula_) {
+ PerformPostEulaActions();
+ PerformPostUpdateActions();
+ ShowEnterpriseEnrollmentScreen();
+ } else {
+ InitiateOOBEUpdate();
+ }
}
void WizardController::OnUpdateErrorCheckingForUpdate() {
@@ -479,20 +490,27 @@ void WizardController::OnEnterpriseAutoEnrollmentDone() {
}
void WizardController::OnOOBECompleted() {
- MarkOobeCompleted();
+ PerformPostUpdateActions();
ShowLoginScreen();
}
void WizardController::InitiateOOBEUpdate() {
+ PerformPostEulaActions();
+ GetUpdateScreen()->StartUpdate();
+ SetCurrentScreenSmooth(GetUpdateScreen(), true);
+}
+
+void WizardController::PerformPostEulaActions() {
// Now that EULA has been accepted (for official builds), enable portal check.
// ChromiumOS builds would go though this code path too.
chromeos::CrosLibrary::Get()->GetNetworkLibrary()->
SetDefaultCheckPortalList();
host_->CheckForAutoEnrollment();
- GetUpdateScreen()->StartUpdate();
- SetCurrentScreenSmooth(GetUpdateScreen(), true);
}
+void WizardController::PerformPostUpdateActions() {
+ MarkOobeCompleted();
+}
void WizardController::SetCurrentScreen(WizardScreen* new_current) {
SetCurrentScreenSmooth(new_current, false);
@@ -738,11 +756,11 @@ void WizardController::OnSetUserNamePassword(const std::string& username,
password_ = password;
}
-void WizardController::set_usage_statistics_reporting(bool val) {
+void WizardController::SetUsageStatisticsReporting(bool val) {
usage_statistics_reporting_ = val;
}
-bool WizardController::usage_statistics_reporting() const {
+bool WizardController::GetUsageStatisticsReporting() const {
return usage_statistics_reporting_;
}
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.h ('k') | chrome/browser/chromeos/login/wizard_controller_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698