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

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

Issue 2771803003: Don't start FRE from the login screen (Closed)
Patch Set: Improve comments Created 3 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 0bb90ffa50a5ffa7e504dba763c28d2466112f3d..89806379f57edabee2bc20b598bbe74f865834a8 100644
--- a/chrome/browser/chromeos/login/wizard_controller.cc
+++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -32,6 +32,7 @@
#include "chrome/browser/chromeos/arc/arc_util.h"
#include "chrome/browser/chromeos/customization/customization_document.h"
#include "chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen.h"
+#include "chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h"
#include "chrome/browser/chromeos/login/enrollment/enrollment_screen.h"
#include "chrome/browser/chromeos/login/existing_user_controller.h"
#include "chrome/browser/chromeos/login/helper.h"
@@ -586,7 +587,7 @@ void WizardController::ShowAutoEnrollmentCheckScreen() {
AutoEnrollmentCheckScreen::Get(screen_manager());
if (retry_auto_enrollment_check_)
screen->ClearState();
- screen->set_auto_enrollment_controller(host_->GetAutoEnrollmentController());
+ screen->set_auto_enrollment_controller(GetAutoEnrollmentController());
SetCurrentScreen(screen);
}
@@ -664,18 +665,17 @@ void WizardController::OnHIDDetectionCompleted() {
}
void WizardController::OnNetworkConnected() {
- if (!StartupUtils::IsEulaAccepted()) {
- if (is_official_build_) {
+ if (is_official_build_) {
+ if (!StartupUtils::IsEulaAccepted()) {
ShowEulaScreen();
} else {
- // Follow the same flow as if EULA had been accepted.
- OnEulaAccepted();
+ // Possible cases:
+ // 1. EULA was accepted, forced shutdown/reboot during update.
+ // 2. EULA was accepted, planned reboot after update.
+ // Make sure that device is up to date.
+ InitiateOOBEUpdate();
}
} else {
- // Possible cases:
- // 1. EULA was accepted, forced shutdown/reboot during update.
- // 2. EULA was accepted, planned reboot after update.
- // Make sure that device is up to date.
InitiateOOBEUpdate();
}
}
@@ -931,7 +931,7 @@ void WizardController::PerformPostEulaActions() {
// ChromiumOS builds would go though this code path too.
NetworkHandler::Get()->network_state_handler()->SetCheckPortalList(
NetworkStateHandler::kDefaultCheckPortalList);
- host_->GetAutoEnrollmentController()->Start();
+ GetAutoEnrollmentController()->Start();
host_->PrewarmAuthentication();
network_portal_detector::GetInstance()->Enable(true);
}
@@ -1540,4 +1540,10 @@ void WizardController::StartEnrollmentScreen(bool force_interactive) {
SetCurrentScreen(screen);
}
+AutoEnrollmentController* WizardController::GetAutoEnrollmentController() {
+ if (!auto_enrollment_controller_)
+ auto_enrollment_controller_ = base::MakeUnique<AutoEnrollmentController>();
+ return auto_enrollment_controller_.get();
+}
+
} // namespace chromeos
« 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