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

Unified Diff: chrome/browser/chromeos/policy/device_cloud_policy_initializer.cc

Issue 2340933004: Do not try to enroll past OOBE/enrollment. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/policy/device_cloud_policy_initializer.cc
diff --git a/chrome/browser/chromeos/policy/device_cloud_policy_initializer.cc b/chrome/browser/chromeos/policy/device_cloud_policy_initializer.cc
index 7004daf82e9783461b5873c214b5284fda264e46..464a4f96a59fc3cd7d0b04adcf1c0faedb3677bf 100644
--- a/chrome/browser/chromeos/policy/device_cloud_policy_initializer.cc
+++ b/chrome/browser/chromeos/policy/device_cloud_policy_initializer.cc
@@ -149,7 +149,13 @@ EnrollmentConfig DeviceCloudPolicyInitializer::GetPrescribedEnrollmentConfig()
break;
}
+ // If OOBE is done and we are not enrolled, make sure we only try interactive
+ // enrollment.
const bool oobe_complete = local_state_->GetBoolean(prefs::kOobeComplete);
+ if (oobe_complete &&
+ config.auth_mechanism == EnrollmentConfig::AUTH_MECHANISM_BEST_AVAILABLE)
+ config.auth_mechanism = EnrollmentConfig::AUTH_MECHANISM_INTERACTIVE;
xiyuan 2016/09/16 07:49:13 nit: wrap with {} since the condition takes more t
+ // If OOBE is done and we are enrolled, check for need to recover enrollment.
if (oobe_complete && install_attributes_->IsEnterpriseDevice()) {
// Regardless what mode is applicable, the enrollment domain is fixed.
config.management_domain = install_attributes_->GetDomain();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698