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

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

Issue 2771803003: Don't start FRE from the login screen (Closed)
Patch Set: Created 3 years, 9 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 f47b9b764942cc57805bd070cf08696ce312edef..779f653c14ccc9ca4eb53fbff9e57ae4f786b412 100644
--- a/chrome/browser/chromeos/login/wizard_controller.cc
+++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -31,6 +31,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"
@@ -591,7 +592,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);
}
@@ -661,17 +662,18 @@ void WizardController::OnHIDDetectionCompleted() {
}
void WizardController::OnNetworkConnected() {
- if (is_official_build_) {
- if (!StartupUtils::IsEulaAccepted()) {
+ if (!StartupUtils::IsEulaAccepted()) {
+ if (is_official_build_) {
ShowEulaScreen();
} 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();
+ // Follow the same flow as if EULA had been accepted.
+ OnEulaAccepted();
}
} 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();
}
}
@@ -928,7 +930,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);
}
@@ -1518,4 +1520,11 @@ void WizardController::StartEnrollmentScreen(bool force_interactive) {
SetCurrentScreen(screen);
}
+AutoEnrollmentController* WizardController::GetAutoEnrollmentController() {
+ if (!auto_enrollment_controller_) {
achuithb 2017/03/24 01:33:29 don't need {}
Thiemo Nagel 2017/04/12 14:30:40 Done.
+ auto_enrollment_controller_ = base::MakeUnique<AutoEnrollmentController>();
+ }
+ return auto_enrollment_controller_.get();
+}
+
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698