Commit 9893b4cf authored by Renato Silva's avatar Renato Silva Committed by Commit Bot

CrOS - Add more logs to some enrollment steps

Add some extra logging information to some of the enrollment
steps to help us on determining if forced enrollment is preventing
some integrating tests from running.

Bug: 1109176
Change-Id: Icd375f78bb238a40380d9bc9234a6301ab521e75
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2442534Reviewed-by: default avatarRoman Sorokin [CET] <rsorokin@chromium.org>
Commit-Queue: Renato Silva <rrsilva@google.com>
Cr-Commit-Position: refs/heads/master@{#814633}
parent 5e716ee2
......@@ -118,6 +118,8 @@ void AutoEnrollmentCheckScreen::ShowImpl() {
policy::AUTO_ENROLLMENT_STATE_CONNECTION_ERROR ||
auto_enrollment_controller_->state() ==
policy::AUTO_ENROLLMENT_STATE_SERVER_ERROR) {
VLOG(1) << "AutoEnrollmentCheckScreen::ShowImpl() retrying enrollment"
<< " check due to failure.";
auto_enrollment_controller_->Retry();
} else {
auto_enrollment_controller_->Start();
......@@ -178,6 +180,8 @@ void AutoEnrollmentCheckScreen::UpdateState() {
// state.
if (retry)
auto_enrollment_controller_->Retry();
VLOG(1) << "AutoEnrollmentCheckScreen::UpdateState() retry = " << retry;
}
bool AutoEnrollmentCheckScreen::UpdateCaptivePortalStatus(
......@@ -261,6 +265,8 @@ void AutoEnrollmentCheckScreen::OnErrorScreenHidden() {
}
void AutoEnrollmentCheckScreen::SignalCompletion() {
VLOG(1) << "AutoEnrollmentCheckScreen::SignalCompletion()";
network_portal_detector::GetInstance()->RemoveObserver(this);
auto_enrollment_progress_subscription_.reset();
connect_request_subscription_.reset();
......
......@@ -202,6 +202,10 @@ void EnrollmentScreen::OnAuthCleared(const base::Closure& callback) {
}
bool EnrollmentScreen::MaybeSkip(WizardContext* context) {
VLOG(1) << "EnrollmentScreen::MaybeSkip("
<< "config_.is_forced = " << config_.is_forced()
<< "skip_to_login_for_tests = " << context->skip_to_login_for_tests
<< ").";
if (context->skip_to_login_for_tests && !config_.is_forced()) {
exit_callback_.Run(Result::SKIPPED_FOR_TESTS);
return true;
......
......@@ -195,8 +195,12 @@ void LoginDisplayHostCommon::StartKiosk(const KioskAppId& kiosk_app_id,
}
void LoginDisplayHostCommon::CompleteLogin(const UserContext& user_context) {
if (GetExistingUserController())
if (GetExistingUserController()) {
GetExistingUserController()->CompleteLogin(user_context);
} else {
LOG(WARNING) << "LoginDisplayHostCommon::CompleteLogin - Failure : "
<< "ExistingUserController not available.";
}
}
void LoginDisplayHostCommon::OnGaiaScreenReady() {
......
......@@ -911,7 +911,7 @@ void WizardController::OnActiveDirectoryLoginScreenExit() {
}
void WizardController::SkipToLoginForTesting() {
VLOG(1) << "SkipToLoginForTesting.";
VLOG(1) << "WizardController::SkipToLoginForTesting()";
if (current_screen_ && current_screen_->screen_id() == GaiaView::kScreenId)
return;
wizard_context_->skip_to_login_for_tests = true;
......@@ -1117,7 +1117,7 @@ void WizardController::OnUpdateCompleted() {
void WizardController::OnAutoEnrollmentCheckScreenExit() {
OnScreenExit(AutoEnrollmentCheckScreenView::kScreenId, kDefaultExitReason);
VLOG(1) << "WizardController::OnAutoEnrollmentCheckScreenExit()";
// Check whether the device is disabled. OnDeviceDisabledChecked() will be
// invoked when the result of this check is known. Until then, the current
// screen will remain visible and will continue showing a spinner.
......@@ -1131,7 +1131,8 @@ void WizardController::OnAutoEnrollmentCheckScreenExit() {
void WizardController::OnEnrollmentScreenExit(EnrollmentScreen::Result result) {
OnScreenExit(EnrollmentScreenView::kScreenId,
EnrollmentScreen::GetResultString(result));
VLOG(1) << "WizardController::OnEnrollmentScreenExit(result= "
<< EnrollmentScreen::GetResultString(result) << ").";
switch (result) {
case EnrollmentScreen::Result::COMPLETED:
case EnrollmentScreen::Result::SKIPPED_FOR_TESTS:
......@@ -1479,8 +1480,8 @@ void WizardController::OnDeviceDisabledChecked(bool device_disabled) {
} else if (wizard_context_->enrollment_triggered_early ||
prescribed_enrollment_config_.should_enroll() ||
configuration_forced_enrollment) {
VLOG(1) << "StartEnrollment from OnDeviceDisabledChecked(device_disabled="
<< device_disabled << ") "
VLOG(1) << "StartEnrollment from OnDeviceDisabledChecked("
<< "device_disabled=" << device_disabled << ") "
<< "skip_update_enroll_after_eula_="
<< wizard_context_->enrollment_triggered_early
<< ", prescribed_enrollment_config_.should_enroll()="
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment